Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Nifiga did not understand what you want.
Pulled the request from the change history, corrected it a bit
await _context.A.Include(a => a.B)
.ThenInclude(a => a.C)
.Where(a => a.Id == 1)
.Select(a => new ADto
{
Id = a.Id,
C = a.C.Select(c => new CDto { Id = c.Id, Name = c.Name}).ToList(),
B = new BDto { Id = a.B.Id, Name = a.B.Name }
})
.SingleAsync();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question