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