我在使用EF 4.0时遇到了问题。
我创建了一个带有"timestamp"列的实体。之后,我尝试生成数据库。
在SQL脚本中,该列看起来像是'binary(8)'而不是时间戳。
如何解决这个问题?
我在使用EF 4.0时遇到了问题。
我创建了一个带有"timestamp"列的实体。之后,我尝试生成数据库。
在SQL脚本中,该列看起来像是'binary(8)'而不是时间戳。
如何解决这个问题?
[<#=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) ? "," : ""#>