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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -