📜  我的上下文类在不同的项目中,我想在 asp.net mvc 中的不同项目中迁移 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:45.137000             🧑  作者: Mango

代码示例1
enable-migrations -ContextProjectName MyProject.MVC -StartUpProjectName MyProject.MVC 
-ContextTypeName MyProject.MVC.MyContextFolder.MyContextName -ProjectName MyProject
This will add migrations to your MyProject project using the context in the MyProject.MVC. You need to make sure that the project with the Migrations has a reference to the project with your Context, i.e., MyProject references MyProject.MVC