2016-12-28 47 views
1

我看到一些LINQ代码示例,其中包含ThenInclude。我在哪里可以找到这样的方法?在外部库或其他名称空间中。我在哪里可以找到Linq ThenInclude方法?

我想用这样的方法对于衍生获取数据,但我无法找到这样的方法或你知道其他的解决办法

 return _dbContext.Goals 
      .Where(p => p.Owner.Id == userId) 
      .Include(p => p.GoalExpectation) 
       .ThenInclude<RangeGoalExpectation>(p => p.MinValue) 
       .ThenInclude<RangeGoalExpectation>(p => p.MaxValue) 
       .ThenInclude<SpecifiedGoalExpectation>(p => p.Value) 
+1

这是EF Core扩展方法。 –

回答

5

ThenInclude是实体框架的核心(EF 7)的一部分。

相关问题