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

C# random value from dictionary and tuple -

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

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -