c# - ASP MVC - Adding columns to all tables using EF Code First -
i need add set of columns of database's tables (sql server).
have generated database using code first migrations in entity framework 6.
is possible add these columns of tables @ once ? instance, overriding onmodelcreating method specific code ?
or have add these columns each of models used update database ?
thank in advance !
--
glad
i found solution, muthu.
to automatically add "common columns" tables, had create "base model" containing these columns, , make of models inherit it.
this avoids repeatedly adding columns each model properties, , looks cleaner believe.
Comments
Post a Comment