Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EF7 'dnx ef update database' not working

I use Entity Framework 7.0.0-beta7. If I want to update my database with 'dnx ef update database' I get a 'done'. But nothing happend. Is there a way to manually (in code) start the migration and debug it?

Update: no it works

  1. I moved the mode back to the web project,
  2. called 'dnvm install latest'
  3. called 'dnx ef database update -c myContext' because I have more
like image 866
Hajooo Avatar asked Feb 21 '26 19:02

Hajooo


1 Answers

I meet a same issue in EF RC1. and i have a finding, hope it can help you. i create a project to involve entity model and EF DBContext. then web project reference the project. run these commands, not working:

  1. dnx ef migrations add MyFirstMigration
  2. dnx ef database update results

but when i move the DBContext class to my web project, models still in other project, it working fine.New result

so in my scenario need make sure DBContext in Web project.

like image 113
Selim Avatar answered Feb 27 '26 08:02

Selim