I am new to EF 6, then I stumble upon this query and I need to modify it to include the data from OrderDelay table. I only intend to get a single row from the database so I tried .Include(m => m.OrderDelay.FirstOrDefault()) instead of .Include(m => m.OrderDelay). But it does not work. Any idea on how to get just a single row for this table?
var res = await _db
.Include(m => m.BusAdd)
.ThenInclude(b => b.Suburb)
.ThenInclude(s => s.State)
........
.Include(m => m.OrderDelay)
.AsNoTracking()
.SingleOrDefaultAsync(p => p.Id == id);
return res;