Entityframework - Include nested children from parent

entity-framework entity-framework-6 linq-to-entities

Popular Answer

Apply theInclude the following is a way to load many layers of linked entities:


    dbContext.
    .Where(f => f.Id == Tenant.Id)
        .Include(t => t.Users.Select(un => un.Nicknames))
        .Include(t => t.Users.Select(uf => uf.FavoriteMovies))
    .SingleOrDefault();

0
4/17/2020 11:43:28 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow