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)
这是EF Core扩展方法。 –