Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include and ThenInclude not working after select #13207

Closed
AniMeIIIkA opened this issue Sep 4, 2018 · 1 comment
Closed

Include and ThenInclude not working after select #13207

AniMeIIIkA opened this issue Sep 4, 2018 · 1 comment

Comments

@AniMeIIIkA
Copy link

AniMeIIIkA commented Sep 4, 2018

Microsoft.AspNetCore.All - 2.1.3

 var userCourses = await ctx.UserCourses
        .Include(x => x.User)
            .ThenInclude(x => x.UserCompanies)
                .ThenInclude(x => x.Company)
                    .ThenInclude(x => x.Licenses)
                        .ThenInclude(x => x.CompanyCourseLicenses)
        .Select(x => new
        {
            x.Course.Title,
            x.User
        })
        .ToListAsync();

All User navigation property ICollection is null
If i remove select, then userCourse have User with all ICollection's

@smitpatel
Copy link
Contributor

Duplicate of #12737

@smitpatel smitpatel marked this as a duplicate of #12737 Sep 5, 2018
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants