title: NHibernate DTO with deep object graph
body: <p>I am writing a smart client WPF application using MVVM that communicates with a WCF service layer containing the business logic and domain objects that uses NHibernate to manage persistence. We are in control of both sides of the wire.</p>
  
  <p>Currently, I am working on creating a screen to Edit Product Details it has a tab control with each tab representing some aspect of the Product such as Main Details, Product Class, Container Type and so on. In the end, there will probably be at least 5 of these tabs.</p>
  
  <p>Up to now I have been working on transforming simple domain objects to DTOs using SetResultTransformer and this has been working quite nicely.</p>
  
  <p>Now that I am getting to a more complicated object I am getting a bit stuck. I would like to return a DTO to be displayed that contains the Main Product details, categories and classes. As far as categories and classes are concerned I would not want to return every single property of the domain object.</p>
  
  <p><strong>Questions:</strong>
  <br>    1) How do people go about creating a DTO where there are several one to
      many collections to return as in this example?<br>
      2) Is there any concerns about the DTO becoming too large? 
  <br>    3) When sending the DTO back to the back end is it better to send the same type of DTO     with the updated values or some other more command oriented DTO?</p>
  
  <p>Thanks for any help</p>
  
  <p>Alex</p>