If you use migrations, you can simply change the code-based wrapping to use newsequentialid() as DefaultValueSql .
public override void Up() { CreateTable( "SomeTable", c => new { Id = c.Guid(nullable: false, defaultValueSql: "newsequentialid()"), }) .PrimaryKey(t => t.Id) ); }
If you are not using migrations check the question .
Ladislav Mrnka
source share