Entity Framework Core 2.2.4中的System.Data.Entity等效项是什么?

时间:2019-05-24 02:56:33

标签: c# .net-core-2.2

我尝试在.NET Core 2.2中的项目中使用IObjectSet接口,但是对于Entity Framework Core 2.2.4版本,它不起作用。

这是.NET Core 2.2.0中的

IObjectSet<TEntity> GetGroup<TEntity>() where TEntity : class, IObjectWithChangeTracker;
  

未找到类型或名称空间'IObjectSet <>'的名称。

1 个答案:

答案 0 :(得分:0)

您需要更新EF7。在EntityFramework System.Data是版本6中,在这种情况下,您可以使用System.Data,而在EF7中,您应该使用EntityFramework。* nuget包 像下面一样

 using Microsoft.EntityFrameworkCore.*;

使用前请阅读文档 https://github.com/aspnet/EntityFrameworkCore/tree/d1b10fc6ccca83e29109a0a8d9c047f2e68aede5

相关问题