populate object graph from database

Posted by Rama on Stack Overflow See other posts from Stack Overflow or by Rama
Published on 2010-05-04T17:03:26Z Indexed on 2010/05/04 17:08 UTC
Read the original article Hit count: 239

Filed under:
|

Hi, I would like to know the best way to populate an object that has a collection of child objects and each child object may inturn have a collection of objects, from database without making multiple calls to the database to get child objects for each object. basically in hierarchical format something like for example a customer has orders and each order has order items. is it best to retrieve the data in xml format (SQL server 2005), or retrieve a dataset by joining the related tables together and then map that the data to the object? thanks in advance for your help.

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql-server-2005