0
跑在我的包管理器控制台执行以下操作:启用迁移MVC
Enable-Migrations -ContextTypeName Rent-a-Car-MVC.Models.CarDBContext
返回:
The context type 'Rent-a-Car-MVC.Models.CarDBContext' was not found in the assembly 'Rent_a_Car_MVC'.
虽然我有叫Car.cs
包含我的项目的模型文件夹中现有的类以下代码:
public class CarDBContext : DbContext
{
public DbSet<Car> Cars { get; set; }
}
笏我做错了吗?
修复了我的问题。 – Barrosy