schotime / NPoco

Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco
Apache License 2.0
848 stars 302 forks source link

Multiple `IncludeMany` #659

Closed mattbrailsford closed 2 years ago

mattbrailsford commented 2 years ago

I have a model with multiple nested collections that I'd like to populate in a single query. If I have a single collection I can call IncludeMany which works and populates the nested collection, however I'm unable to call this multiple times for multiple collections like you can with Include.

Is there any reason we shouldn't be able to perform multiple IncludeMany's?

schotime commented 2 years ago

No reason, other than the significant complexity, which this library really isn't designed for. Entity Framework is more suited to these types of things. In hindsight I probably wouldn't have implemented this.