阅读背景:

首先是EF代码 - 延迟加载如何设置和访问连接表

来源:互联网 
public class Product
{
    [Key]
    public int Id { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public decimal Price { get; set; }
    public bool IsInStock { get; set; }
    public string ImageUrl { get; set; }
    public List<ProductOption> ProductOptions { get; set; }
    public virtual Category Category { get; set; }

}

public class ProductOption
{
    [Key]
    public int Id { get; set; }
    public string ProductOptionName { get; set; }
    public string ProductOptionDescription { get; set; }
}
public class Product
{
    [Key]
    public int



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: