I have a parent entity that has two collections of children entities attached to it, lets say a car that has a collection of MOT Inspections and a collection of Services.
I know to get the full set of information it would be something along the lines of...
context
.Cars
.Include(m => m.Mots)
.Include(s => s.Services)
.Where(w => w.Reg == reg)
.FirstOrDefault()
However if I wanted to get the car and only the most recent MOT and most recent Service I can't figure out how to write the lamda.
I spent quite a bit if time Googling, but can't find anything EF Core related on this.
Thanks
Tom