title: FSharp Record Types With Entity Framework Code-First
body: <p>I am doing a proof of concept in a line of business application where I want to swap out the current C# Code-First Entity Framework implementation with a F# one.  I am following <a href="http://blogs.msdn.com/b/visualstudio/archive/2011/04/04/f-code-first-development-with-entity-framework-4-1.aspx" rel="noreferrer">this</a> article which seems to work pretty well, but I was hoping to use FSharp record types instead of the classes that the article uses.  When I try and add a data annotation to a record type like this:</p>
  
  <pre><code>type Family = {[&lt;Key&gt;]Id:int; LastName:string; IsRegistered:bool}
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Error   1   The type 'Key' is not defined
  </code></pre>
  
  <p>Is there a way to use data annotations with record types?  Apparently, EF Code-First needs annotations...</p>