C# EF7 UWP SQLite.Include()方法
希望在通用Windows应用程序中使用实体框架7(实体框架核心)和SQLite 找不到.Include(x=>x.somenvagingproperty) .Include()未显示在intellisense中 .Include()在System.Data.Entity中 System.Data.Entity在UWP中不可用 在UWP(as.Include())中有什么用途C# EF7 UWP SQLite.Include()方法,c#,entity-framework,sqlite,uwp,C#,Entity Framework,Sqlite,Uwp,希望在通用Windows应用程序中使用实体框架7(实体框架核心)和SQLite 找不到.Include(x=>x.somenvagingproperty) .Include()未显示在intellisense中 .Include()在System.Data.Entity中 System.Data.Entity在UWP中不可用 在UWP(as.Include())中有什么用途 公共类父类 { 公共Guid Id{get;set;} 公共列表子项{get;set;} } 公营儿童 { 公共Guid
公共类父类
{
公共Guid Id{get;set;}
公共列表子项{get;set;}
}
公营儿童
{
公共Guid Id{get;set;}
公共Guid ParentId{get;set;}
公共父级{get;set;}
}
dbContext.Parent.Include(x=>x.Childs.ToList();
Include(x=>x.Parent.ToList();
您使用System.Linq为
.Include()
添加了错误的命名空间。
您需要使用System.Data.Entity添加,然后您将在Entity Framework 7中获得.Include()
。Include()放置在Microsoft.EntityFrameworkCore中,但不清楚。你到底想要什么?你是说,.Include()
在intellisense中没有出现吗?使用System.Linq添加代码>是“.Include()未显示在intellisense中”