Entity Framework Code-first default data in database

后端 未结 3 1101
轻奢々
轻奢々 2020-12-12 15:49

How do I handle situations in which I need pre-existing data before the app is started or right after the database is generated. For example, I have a list of countries in w

3条回答
  •  [愿得一人]
    2020-12-12 16:30

    For an example see the new MVC / Entity Framework tutorial series at http://www.asp.net/entity-framework/tutorials#Using%20MVC Both #1 and #4 show initializer classes.

提交回复
热议问题