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

[BUG] MultiLayer Includes #340

Closed
Zigimun opened this issue Jan 7, 2022 · 4 comments
Closed

[BUG] MultiLayer Includes #340

Zigimun opened this issue Jan 7, 2022 · 4 comments

Comments

@Zigimun
Copy link
Contributor

Zigimun commented Jan 7, 2022

I know there is a way to do the Includes right now with the specifications. But there is a problem or I dont know how to do it.

Let say I have Planets that have multiple Units which have multiple Sectors.

Now I can do the Include for Plants with function Includes. But then I cannot do the ThenInclude for the Sectors as well. This feature would be good if those Sectors have lets say documents that I can then go Documents.Include(x => x.Sector). ThenInclude (x => x.Unit). ThenInclude (x => x.Plant) to get the data for whole document without multiple calls to the API.

Am I missing something?

Best regards!

@dsoltesz
Copy link

dsoltesz commented Jan 7, 2022 via email

@Zigimun
Copy link
Contributor Author

Zigimun commented Jan 7, 2022

Does this include the other way around? So.
Plant.Include(x => x.Units.selectmany(x => x.Sectors.selectmany(x => Documents). Collections of Units with Collection of Sectors ...

@dsoltesz
Copy link

dsoltesz commented Jan 7, 2022 via email

@Zigimun
Copy link
Contributor Author

Zigimun commented Jan 7, 2022

Thank you will give it a try.

@Zigimun Zigimun closed this as completed Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants