簡體   English   中英

在哪里可以找到Linq ThenInclude方法?

[英]Where can I find Linq ThenInclude method?

我看到了一些包含ThenInclude的 LINQ代碼示例。 在哪里可以找到這種方法? 在外部庫或其他命名空間中。

我想使用這種方法獲取派生數據,但是我找不到這種方法,或者您知道其他解決方案嗎

        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)

然后,Include是Entity Framework Core(EF 7)的一部分。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM