title: Sharing content between business objects and DTOs
body: <p>All,</p>
  
  <p>My typical approach for a medium sized WCF service would be something like:</p>
  
  <ol>
  <li>Define the interface using WCF data contracts and service operations.  The data contracts would be POCO DTOs with no CRUD or domain logic.</li>
  <li>Model the domain using fully featured business objects.</li>
  <li>Provide some mechanism to go from DTO to BO and vice versa (see related question: <a href="https://stackoverflow.com/questions/3123167/pattern-strategy-for-creating-bos-from-dtos">Pattern/Strategy for creating BOs from DTOs</a>)</li>
  </ol>
  
  <p>Now, a lot of the time (if not always) the data content of the business object and the DTO is near identical.  How do people feel about creating a library of content objects which are shared by the BO and the DTO.  E.g. if we had a WibbleDTO and a WibbleBO, we could create an IWibbleContent interface which both implement.  We could even create an IWibbleContent interface and a WibbleContent class which both the DTO and BO hold a reference to.</p>
  
  <p>So, specific questions:</p>
  
  <ol>
  <li>Do you ever share content/data interfaces between your DTOs and BOs?</li>
  <li>Do you ever share data content classes between your DTOs and BOs?</li>
  </ol>
  
  <p>If not then I guess, as per my related question, we're left with tedious copying code, or we use something like AutoMapper.</p>
  
  <p>Any comments appreciated.</p>