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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -