title: Entity Framework: field of composite key cannot be nullable?
body: <p>I have a model with composite key - the row is the key:</p>
  
  <pre><code>public class Item
  {
      [Key, Column(Order = 0)]
      public int UserId { get; set; }
      [Key, Column(Order = 1)]
      public DateTime? Date { get; set; }
  }
  </code></pre>
  
  <p>Running the code below it throws an exception <code>DbEntityValidationException</code> with message: <code>The Date field is required.</code>:</p>
  
  <pre><code>var it = new Item { Date = null, UserId = 2 };
  m_Entities.Items.Add(it);
  m_Entities.SaveChanges(); // throws exception
  </code></pre>
  
  <p>(<code>m_Entities</code> is usual <code>DbContext</code> descendant with Items defined as <code>DbSet&lt;Item&gt;</code>)
  Why is the <code>Date</code> required if it can be <code>null</code> (declared as <code>DateTime?</code>) ? And how to allow <code>null</code> to be a valid value for <code>Date</code>?</p>