title: Nullable reference type in C#8 when using DTO classes with an ORM
body: <p>I activated this feature in a project having data transfer object (DTO) classes, as given below:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class Connection
      {
          public string ServiceUrl { get; set; }
          public string? UserName { get; set; }
          public string? Password { get; set; }
          //... others 
      }
  </code></pre>
  
  <p>But I get the error:</p>
  
  <blockquote>
    <p><code>CS8618</code>: Non-nullable property 'ServiceUrl' is uninitialized. Consider declaring the property as nullable.</p>
  </blockquote>
  
  <p>This is a DTO class, so I'm not initializing the properties. This will be the responsibility of the code initializing the class to ensure that the properties are non-null. </p>
  
  <p>For example, the caller can do:</p>
  
  <pre class="lang-cs prettyprint-override"><code>var connection = new Connection
  {
    ServiceUrl=some_value,
    //...
  }
  </code></pre>
  
  <p>My question: How to handle such errors in DTO classes when C#8's nullability context is enabled?</p>