Не выходит LINQ запрос с методом GroupBy
public class ReportDto
{
public DateTime Date { get; set; }
public WordDto[] Words { get; set; }
}
ReportDto[] qwe = this.context.TestResults
.Where(r => r.Word.Vocabulary.VocabularyID == id)
.GroupBy(r => r.Date)
.Select(r => new ReportDto
{
Date = r.Key,
Words = r.Select(re => new WordDto
{
ID = re.WordID.ToString(),
Original = re.Word.Original,
Translate = re.Word.Translation,
Result = re.Result
}).ToArray()
}).ToArray();
Ошибка:
Additional information: LINQ to Entities does not recognize the method 'Core.Dto.WordDto[] ToArrayWordDto method, and this method cannot be translated into a store expression.
.AsEnumerable()
после.GroupBy(r => r.Date)
.