title: Managing DTOs and mapping in large .NET project
body: <p>My team and I are building a large .NET WinForms applications. The application uses various "Services" to get data to and from our database. Each "service" lives in its own solution, and handles a specific type of data. So, for example, our "ContactsService" manages retrieving / saving contacts to our database.</p>
  
  <p>Typically, we have been building DTOs for each service. So, we might have a "ContactDTO" that has simple string properties for each piece of data on the contact. Now, we also have a business layer "Contact" class that has the exact same properties, and perhaps a few extra methods with some business logic. On top of that, the "ContactsService" has its own Contact class, which is hydrated from the ContactDTO.</p>
  
  <p>It has become a huge pain to manage all of our DTOs and mapping. Currently, sending a contact to be stored in the database looks like this:</p>
  
  <ul>
  <li>Map client Contact to ContactDTO</li>
  <li>Map ContactDTO to service Contact</li>
  <li>Save Contact</li>
  <li>Map service Contact to ContactDTO</li>
  <li>Map ContactDTO to client Contact</li>
  </ul>
  
  <p>This just feels crappy. If we add a property to our client Contact class, we have to add the property and mappings in 3-4 places.</p>
  
  <p>What are we doing wrong and how can we make our lives easier? Would it be simpler to use something like Json.NET and have JSON DTOs? We checked out AutoMapper, but some team members thought it was too complicated.</p>