I have a SQLite table that contains every test result we\'ve run, and I\'m looking to write an entity framework query that returns only the most recent test result per project.
Try with a subquery instead of a grouping. Like this:
results = await _context.Results .Include(x => x.Project) .AsNoTracking() .Where( r => r.Id == _context.Results.Where( rr => rr.ProjectId == r.ProjectID).Max( rr => rr.Id) ) .ToListAsync();