I am building a solution with the following Projects:
Main.Data
- Class Library projectMain.API
- Asp.NET MVC WebApi -
I can now enable Execute Code First Migrations
when I create a publish profile.
Here is what I did to achieve it:
Main/Web.config
I changed the name of the connection string to the FQN of the context class: Main.Data.MyContext
.Main
project to Main.Data
Project (which was not needed until now).This does the job for me.
If anyone got a better or more educating answer, I would be happy to hear it.