I have ASP.NET MVC4 app with Entity Framework Code First approach. I've moved my DbContext inheritor to separate Model project recently (I've copied connection string from web.config to the app.config).
Now when I'm trying to run my app I've got error that my database should be created directly through Code First or Migrations. First way is not suitable for me because I have remote DB server (I've created it through hoster's control panel).
But when I'm trying to enable Migrations I've got error that No context type was found in the assembly 'MyProject'
. This is obviously happen because my DbContext inheritor not placed in the start project.
So how can I indicate to look context class in separate project?
By the way, I have DropCreateDatabaseIfModelChanges<>
initializer for my DbContext inheritor.