I\'m using ASP.Net Core 2.0 with Entity Framework and I am trying to return a model to a page that contains the Employment entity with it\'s collection of EmploymentDocument ent
Select all data you need by hands and store it in some Dto object:
var employment = await _context.Employment .Where(m => m.EmploymentID == id) .Select(e => new EmploymentDto { ID = e.EmploymentID, Docs = e.EmploymentDocuments.Select(o => o.FileName) }) .SingleOrDefaultAsync();