Bri*_*kim 9 database timestamp entity-framework
我遇到了EF 4.0的问题我创建了带有"timestamp"列的实体.之后,我尝试生成数据库.
在SQL脚本中,列看起来像'binary(8)'而不是时间戳.
怎么解决?
Bri*_*kim 12
问题解决了:EF 4无法从edmx设计器生成时间戳列.解决方案很简单:
[<#= 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)?",":""#>
| 归档时间: |
|
| 查看次数: |
3259 次 |
| 最近记录: |