title: Mapping DTO to Entity
body: <p>I'm trying to map DTO's to Entities. When I searched it online I noticed lots of references to AutoMapper and just as much feedback about how it is not a good way to do this.</p>
  
  <p>Also I couldn't find any newly dated sources, one question complaining about how there are no "new" sources is 4 years old. </p>
  
  <p>One of the sources I found, which looked really promising was this 
  <a href="https://rogerjohansson.blog/2013/12/01/why-mapping-dtos-to-entities-using-automapper-and-entityframework-is-horrible/" rel="nofollow noreferrer">https://rogerjohansson.blog/2013/12/01/why-mapping-dtos-to-entities-using-automapper-and-entityframework-is-horrible/</a></p>
  
  <p>and I couldnt get it working either.</p>
  
  <p>So, basically situation is like this.</p>
  
  <p>I'm trying to do an integration about orders by using wcf. (A whole another case) </p>
  
  <p>I have an order dto  and related dto's are orderline, customer, customeraddress, orderadress. Some more will follow later.</p>
  
  <p>Since these are essentially database tables, main "table" is Order. It acts as the header, orderline and others are self explanatory. I'm sure everyone came across something like this before.</p>
  
  <p>I created Dto's according to their counterpart entities. </p>
  
  <p>What I'm told to do is;</p>
  
  <p>a) Convert (or as terminology goes, map?) these DTO's to Entities</p>
  
  <p>b) Add the entity to dbcontext and savechanges.</p>
  
  <p>So, can anyone point me in a good direction on solving this situation?</p>