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.
reply comment:
if (!context.postalcodes.any()) { ienumerable<postalcode> postalcodes = readpostalcodes(); foreach(var postalcode in postalcodes) { context.postalcodes.add(postalcode); } context.savechanges(); }
Comments
Post a Comment