LINQ:IAsyncGrouping和IGrouping冲突

时间:2017-09-06 11:24:02

标签: c# linq

我有这段代码:

var result = await _issueRepository
                      .List(l => true)
                      .Include(l => l.Issue)
                      .Where(l => l.Issue.Deleted == false 
                          && linkedIncidentsTotal
                             .Any(x => x.Contains(l.Lable.LabelTitle)))
                      .GroupBy(l => l.Lable)
                      .ToListAsync();

当它执行时,我收到错误:

  

类型的表达   'System.Collections.Generic.IAsyncEnumerable 1[System.Linq.IAsyncGrouping 2 [mobo.Models.Lables,mobo.Models.LableIssues]]'   不能用于返回类型   'System.Collections.Generic.IAsyncEnumerable 1[System.Linq.IGrouping 2 [mb.Models.Lables,mb.Models.LableIssues]]'

0 个答案:

没有答案