✅ .Where in Include stetment not returning correctly
I dont understand why does this pull from database like this, shouldnt it be 5 Comments on first level (with NestedLevel == 0) and then inside of them list with comments with (NestedLevel == 1) like a tree , for some reason this pulls 8 comments in the root level list, where not all comments are NestedLevel = 0, I am so confused, I am reading documentation and it shouldnt behave like this.
5 Replies
That is not how include works
Include is solely there to navigate to foreign key properties that will be included in the result set of objects
The
.Where
comes after including your foreign key propertiesSo I need to use select? That way I am losing tracking for comments properties
you can filter inside includes
Oh can you? What would be the difference to separating it?
You can in versions above 5 I think, and that tracks entities unlike using Select, from what I read, but somehow I can't make it work on nested properties, I've been trying for 6 hours straight to make it work and I just can't so I decided to ask people here for help
So i was dumb and i designed data incorrectly, my bad, now I fixed an error, Ill close this