2016-12-28 43 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)的一部分。

相關問題