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.
Your method couldn't be translated to T-SQL, Linq to Entities couldn't recognize it. You can modify the code as below (adding AsEnumerable after AsNoTracking
):
.Include(x => x.Project)
.AsNoTracking()
.AsEnumerable()
With AsEnumerable
after data is loaded, any further operation is performed using Linq to Objects, on the data already in memory.