I have a NoteBrief
public int Id { get; set; } public string Title { get; set; } public DateTime Created { get; set; } public int ParentNoteId { get; s
Try following
return _ctx.Notes.Select(r => new NoteBrief { Id = r.Id, Title = r.Title, Created = r.Created, ParentNoteId = r.ParentNoteId, }).OrderBy(x=>x.Created).GroupBy(x=>new {Id=x.Id, Title=x.Title}).Select(x=>x.First()).AsQueryable();
}