title: using Guid as PK with EF4 Code First
body: <p>I have this class and table:</p>
  
  <pre><code>public class Foo
  {
  public Guid Id {get;set;}
  public string Name {get;set;}   
  }
  </code></pre>
  
  <hr>
  
  <pre><code>create table Foo
  (
  id uniqueidentifier primary KEY DEFAULT (newsequentialid()),
  name nvarchar(255)
  )
  </code></pre>
  
  <p>the problem is that when i try to save new foo the first one goes with the 0000-000-00 ... id and the second also, so I get constraint exception</p>
  
  <p>anybody knows a fix ?</p>