I have one project that I want to run my update-database
against but I have my Models and Context in a separate project.
If I run enable-migrations
I get this error:
No context type was found in the assembly 'MyProject'.
This is presumably because my Context is in MyProject.MVC.
If I run enable-migrations
against MyProject.MVC I have to add an app config file. I don't want to do that as I want to use the code across many projects.
So can I run enable-migrations
against MyProject and somehow tell it to look in MyProject.MVC for the Context?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…