1

There are lots of tutorial for database migration when using code first approach with nuget. How can i migrate if i use database first approach in my MVC applicaion ?

umki
  • 769
  • 13
  • 31

1 Answers1

0

You can't!

EF database migration only targets the code first approach. As you can see in the model designer in VS, when you right-click on the model, you have just one option about the update which is Update model from Database.

Another relative option is Generate database from model which I don't think that you need to use it!

However, you can change your approach to Code first and start to use all of its magic tools. To do so, see my answer here

Community
  • 1
  • 1
Amin Saqi
  • 18,549
  • 7
  • 50
  • 70
  • I know this is not the good approach but i had 150 table in my database and i needed to something which creates models for me .. So i add AdoModel to my Model folder and it creates the all Model Classes for me ? Do you think it is a bad approach ? But yes i agree, i love the codefirst approach :) – umki Jul 26 '13 at 19:00