title: Create DTO classes from POCO classes C#
body: <p>I'm having some troubles of defining how should the <strong>DTO</strong> classes for my <strong>POCO</strong> classes look. I'm using Entity Framework 6.</p>
  
  <p>Here is the example of one <strong>POCO</strong> class:</p>
  
  <pre><code>public class Measurement()
  {
      public long MeasurementID;
      public long Value;
      public DateTime Timestamp;
      public long? ApplicationID;
      public long? DeviceID;
      public long? SensorID;  
  }
  </code></pre>
  
  <p>Should I define <strong>DTO</strong> for this class in the same manner as the <strong>POCO</strong> classes, where <strong>DTO</strong> object will have exactly same attributes? <p>Or should there be actual values, for example, <strong><em>DeviceName</em></strong> instead of <strong><em>DeviceID</em></strong> in this case?
  <br>
  <p>
  Basic idea is:</p>
  
  <p>Client does some measurement, packs it into object that'll have same properties as Measurement <strong>POCO</strong> class, just instead of ID's there will be real property values. (<strong><em>DeviceName</em></strong> for example etc.) So, how should be <strong>DTO</strong> defined at server's side? ID properties are meaningful to server, but real values are meaningful to client. I'm a bit confused of how should the mapping between <strong>DTO</strong> and <strong>POCO</strong> look and what in general to put in DTO. </p>
  
  <p><p>
  Thank you so much in advance!</p>