Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the right way to Load child collections inside a POCO with a SubSonic Repository?

I've read the questions asking about the right way to inject data access into POCOs, and the consensus seems to be "don't". Fine, what is the right way then? If I have an Order object, and I want a list of the OrderLines, I don't want to explicitly assign that list to the POCO externally, that's horribly ugly. So if I can't use DI to give the POCO a little intelligence, do I need to create a dummy object that can grab the extra information?

like image 431
Pete Michaud Avatar asked Jan 24 '26 17:01

Pete Michaud


1 Answers

Sounds like you are trying to establish a one to many relationship.

How to use “one to many” relations in SubSonic

How do I setup my POCO’s with Subsonic 3 and the SimpleRepostitory? or where is the convention?

like image 177
Aaron Avatar answered Jan 26 '26 07:01

Aaron



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!