我正在尝试为我的“OnlineShoppingStore”项目启用迁移,但遇到以下错误,我该如何找出问题所在?
要启用“BookService.Models.BookServiceContext”的迁移,请使用Enable-Migrations -ContextTypeName OnlineShoppingStore.Models.EFDbContext。
namespace OnlineShoppingStore.Models
{
public class Product
{
public int ProductId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public decimal Price { get; set; }
public string Category { get; set; }
}
public class User
{
public string UserId { get; set; }
public string Password { get; set; }
}
public class EFDbContext : DbContext
{
public EFDbContext()
: base("EFDbContext")
{
}
public DbSet<Product> Products { get; set; }
public DbSet<User> Users { get; set; }
}
}
强文