What problem are you trying to solve?
var result = await dbContext.YourTable
.GroupBy(e => e.GroupColumn)
.Select(g => g.OrderBy(e => e.SortColumn).FirstOrDefault())
.ToListAsync();
This way of writing will prompt an exception and cannot run
Describe the solution you'd like
No response