title: 'Nullable object must have a value' when adding entity to set in EF Core
body: <p>I'm having some trouble with adding an entity to a DbSet in EF Core. 
  The entity looks like this:</p>
  
  <pre><code>public class Employee : TenantEntity
  {
      public string FirstName { get; set; }
  
      public string LastName { get; set; }
  
      public string EmailAddress { get; set; }
  
      public string PhoneNumber { get; set; }
  }
  </code></pre>
  
  <p>With this base class:</p>
  
  <pre><code>public class TenantEntity
  {
      public Guid Id { get; set; }
  
      public Guid TenantId { get; set; }
  
      public DateTime CreatedUtc { get; set; }
  
      public DateTime? UpdatedUtc { get; set; }
  
      public DateTime? DeletedUtc { get; set; }
  }
  </code></pre>
  
  <p>The exception occurs in this method:</p>
  
  <pre><code>
  public class MultitenantRepository&lt;TEntity&gt; where TEntity : TenantEntity
  {
  
      ...
      public TEntity Add(TEntity entity)
      {
          entity.TenantId = TenantProvider.GetTenantId();
          entity.CreatedUtc = DateTime.UtcNow;
  
          return Context.Set&lt;TEntity&gt;().Add(entity).Entity;
      }
      ...
  }
  </code></pre>
  
  <p>Specifically on the Add method on Set&lt;>(). Just some more details, I set the DateTime type as <code>datetime2</code> within the DbContext.</p>