title: How to work around EF 4.1, CodeFirst C# DateTime datetime2 vs. datetime incompatibility
body: <p>My Code First models have <code>System.DateTime</code> properties. When the database seeding code is invoked, it throws this exception: </p>
  
  <blockquote>
    <p>SqlException (0x80131904): The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value. </p>
  </blockquote>
  
  <p>I am creating a new <code>DateTime</code> object with the constructor. Code First is creating the database schema. How do I overcome this apparent bug in Code First? I am not particular about my datatype. I merely need to store a date, and optionally a time of day, but not crucial. </p>
  
  <p>I have searched and read a lot of posts, but none with this error specify they come from CodeFirst-generated data scheme. The closest answer I found involved making a change to the <code>ProviderManifestToken</code> in the <code>edmx</code> file, but my project does not have an <code>edmx</code> file. I did not use the designer, I am using Code First.</p>