Complex Business Entities

Topics: General Discussion Forum
Feb 13, 2007 at 7:59 AM
I have recently started using the .asmx WSF and although I am very enthusiastic I am lacking a little when it comes to knowledge. I would like to understand the best way of returning a List<> of Complex Business Entities, by complex I mean made up of two or more classes, like a master detail class for example. I understand the pattern when returning a single class by instantiating the detail classes in the DataAcces Factory class as the reference implementation does for the AccountSummary, but I come seriously unstuck when I try and return a list of these. My gut feel of what I should do is instantiate the Master class in the same way and then in the constructor of the master class call the repository class for each of the detail classes. Does this sound like best practice?