I have a query that ended up being n^3 so I'm simplifying it. I found a way to write it to only be n^2 but for some reason the
.ThenInclude property is missing. Is this not the right way to write it?
test.Include(t => t.a) .Include(t => t.b) .ThenInclude(b => b.c) .Where(t => Users.Exists(u => u.Id == t.a.Id)) .Select( t => t.b) .ToListAsync()
This returns a list of 'b' but b.c is null when I try to access it.
From Microsoft docs:
If you change the query so that it no longer returns instances of the entity type that the query began with, then the include operators are ignored.
You need to rewrite your query to originally return "b" values.