Store Generated Pattern not outputing to fluent mapping
Posted: Wed 29 Jan 2014 00:14
If you set a property's "Store Generated Pattern" to Computed the DbContext template does not write out this specification when fluent mapping is turned on.
I added an OR statement below get this working but this may not take all scenarios into consideration.
Around line ~1392:
I added an OR statement below get this working but this may not take all scenarios into consideration.
Around line ~1392:
Code: Select all
if (prop.PrimaryKey || prop.StoreGeneratedPattern != StoreGeneratedPattern.None) {
#>
.HasDatabaseGeneratedOption(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.<#= prop.StoreGeneratedPattern.ToString() #>)<#+
}