title: SQL column default value with Entity Framework
body: <p>I am trying to use Code-First EF6 with default SQL values. </p>
  
  <p>For example, I have a "CreatedDate" column/property not null with a default in SQL of "getdate()"</p>
  
  <p>How do I represent this in my code Model? Currently I have: </p>
  
  <pre><code>&lt;DatabaseGenerated(DatabaseGeneratedOption.Computed)&gt;
  Public Property CreatedDate As DateTime
  </code></pre>
  
  <p>Will this work, or will I need to use a nullable even though the actual column should be not null, so EF doesn't send a value when it hasn't been set:</p>
  
  <pre><code>&lt;DatabaseGenerated(DatabaseGeneratedOption.Computed)&gt;
  Public Property CreatedDate As DateTime?
  </code></pre>
  
  <p>Or is there a better solution out there?</p>
  
  <p>I don't want EF to handle my defaults - I know this is available to me but not possible in my current situation.</p>