c# - Entity Framework populate entity at starting -


i have project using entity framework. want check if database created , populate table resource directory?

thanks

really, asking 2 different questions. entity framework not database administration tool , such not have functionality directly loading data spreadsheet.

if research each part of question separately, might have more luck.

seeding data entity framework

reading excel files c#

reply comment:

if (!context.postalcodes.any()) {     ienumerable<postalcode> postalcodes = readpostalcodes();     foreach(var postalcode in postalcodes)     {         context.postalcodes.add(postalcode);     }     context.savechanges(); } 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -