我的应用程序我首先使用了实体框架 5 代码我想在不使用“包含”的情况下获取子表数据
public class Category
{
public int Id {get; set;}
public string Name {get; set;}
public virtual ICollection<Product> Products{get;set;}
}
public class Product
{
public int id {get;set}
public string Name{get;set;}
public virtual Category {get;set;}
}
我需要两种方式都得到它,所以它有任何解决方案