I got a problem with EF 4.0 I creating entity with "timestamp" column. After that, I try to generate database.
In SQL script column looks like 'binary(8)' instead of timestamp.
How to solve it ?
I got a problem with EF 4.0 I creating entity with "timestamp" column. After that, I try to generate database.
In SQL script column looks like 'binary(8)' instead of timestamp.
How to solve it ?
the problem solved: EF 4 could'n generate timestamp columns from edmx designer. The solution is easy:
[<#=Id(prop.Name)#>] <#=prop.ToStoreType()#> <#=WriteIdentity(prop, targetVersion)#> <#=WriteNullable(prop.Nullable)#><#=(p < entitySet.ElementType.Properties.Count - 1) ? "," : ""#>
[<#=Id(prop.Name)#>] <#if (string.Compare(prop.Name,"TimeStamp",true) == 0) { #>timestamp<# } else { #><#=prop.ToStoreType()#><# } #> <#=WriteIdentity(prop, targetVersion)#> <#=WriteNullable(prop.Nullable)#><#=(p < entitySet.ElementType.Properties.Count - 1) ? "," : ""#>
© 2022 - 2024 — McMap. All rights reserved.