title: How do I set a field to DBNull in Entity Framework
body: <p>How do you set a field to DBNull in Entity Framework?  The fields are strongly typed so you cannot set it equal to DBNull.Value and I did not find any method to set a field to DBNull.  It seems like this is a necessary thing to do, but after much Google research I found nothing about it.</p>
  
  <p>I am trying to set a datetime field in Entity Framework using vb.net. This requires me to write</p>
  
  <pre><code> myEntity.mydate = Nothing
  </code></pre>
  
  <p>This does not set the field to null but instead sets it to the default date value which is not a valid date value in SQL Server.</p>