However, if you change the model class and then run the application with this initializer, then it will throw an exception. As the name suggests, it will create the database if none exists as per the configuration. CreateDatabaseIfNotExists: This is the default initializer.There are four different database initialization strategies: You already created a database after running your Code-First application the first time, but what about the second time onwards? Will it create a new database every time you run the application? What about the production environment? How do you alter the database when you change your domain model? To handle these scenarios, you have to use one of the database initialization strategies. Next Database Initialization Strategies in EF 6 Code-First
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |