title: EF 4.1 CodeFirst with Guid (not generated by DB/Store) as PK
body: <p>I'd like to create a model with a 'client generated' GUID as the primary key. I want the Guid to be auto-generated, but NOT on the DB, so I know the ID before I persist it, important for my domain model.</p>
  
  <p>How do I setup:</p>
  
  <pre><code>class MyEntity {
      public Guid ID { get; set; }
  }
  </code></pre>
  
  <p>So I can do...</p>
  
  <pre><code> var newEntity = new MyEntity();
   transmitIDBeforePersisting(newEntity.ID);
   context.MyEntities.Add(newEntity);
   context.SaveChanges()
  </code></pre>
  
  <p>How can I setup MyEntity.ID so it is auto-generated when I call new, but still works properly as a Primary Key, with nav properties, etc? </p>
  
  <p>This is similar to <a href="https://stackoverflow.com/questions/5270721/using-guid-as-pk-with-ef4-code-first">using Guid as PK with EF4 Code First</a>, but NOT generated by the Store/DB.</p>