标签:
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.
There are four different database initialization strategies:
To use one of the above DB initialization strategies, you have to set the DB Initializer using Database class in Context class, as shown below:
Database Initialization Strategies in Code-First:
标签:
原文地址:http://www.cnblogs.com/shiningrise/p/5597513.html