When a table has a key column of type uniqueidentifier with a default value of newsequentialid() EF (both the Database First and the Reverse Engineer Code First in the PowerTools) should understand that this field is a StoreGeneratedPattern="Identity".
[Repro]
See attached file for a table definition that uses a uniqueidentifier with default value newsequentialid().
[Expected]
Reverse Engineer Code First, or the regular Database First (EDMX) workflow, should mark the key property as StoreGeneratedPattern="Identity". For example, the SSDL should look like this:
<Property Name="PersonID" Type="uniqueidentifier" Nullable="false" StoreGeneratedPattern="Identity" />
[Actual]
The StoreGeneratedPattern="Identity" is not being generated for GUID properties in this scenario.
[Repro]
See attached file for a table definition that uses a uniqueidentifier with default value newsequentialid().
[Expected]
Reverse Engineer Code First, or the regular Database First (EDMX) workflow, should mark the key property as StoreGeneratedPattern="Identity". For example, the SSDL should look like this:
<Property Name="PersonID" Type="uniqueidentifier" Nullable="false" StoreGeneratedPattern="Identity" />
[Actual]
The StoreGeneratedPattern="Identity" is not being generated for GUID properties in this scenario.