Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Friends,
I am using code first approach in mvc4 , the problem is each and every time if any change occurs in my model then i need to drop my database ? Is there any other approach to drop only table without dropping entire database ? my code sample looks like the below sample tutorial link http://www.itorian.com/2012/08/code-first-approach-in-entity-framework.html[^]
Posted
Comments
[no name] 22-May-14 2:03am    
If you are using Code First, the best approach would be to run a batch file for your DB script, it would check for the changes in the Domain classes and act accordingly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900