I Know how to produce a list by fastest time by Member (list displays by fastest time). I've also excluded records where time hasn't been entered as per below. But how do I display only the best time for each member? For instance the member named Trevor has the fastest 3 times, but I only want to show the fastest time for each member?
public async Task<IActionResult> IndexFastestTimes()
{
var fastesttimes = await _context.MemberData.Where(x => x.Time.Minutes > 0).OrderBy(x => x.Time).ToListAsync();
return View(fastesttimes);
}
For Example the above will return
Trevor 24:00,
Trevor 24:05,
Trevor 24:20,
Paul 24:30,
Paul 24:40,
Tim 25:10,
Tim 25:20
but I want it to return
Trevor 24:00,
Paul 24:30,
Tim 25:10