Mic*_*ael 5 c# mono entity-framework
我在我的Windows计算机上使用了Entity Framework 6,它工作正常.为了在Linux计算机上使用,我尝试使用Mono运行项目.当程序试图访问EF6时,我收到以下错误:
System.InvalidOperationException: The configured column orders for the table 'Table' contains duplicates. Ensure the specified column order values are distinct.
at System.Data.Entity.ModelConfiguration.Conventions.ColumnOrderingConventionStrict.ValidateColumns (System.Data.Entity.Core.Metadata.Edm.EntityType table, System.String tableName) [0x00000] in <filename unknown>:0
at System.Data.Entity.ModelConfiguration.Conventions.ColumnOrderingConvention.Apply (System.Data.Entity.Core.Metadata.Edm.EntityType item, System.Data.Entity.Infrastructure.DbModel model) [0x00000] in <filename unknown>:0
Run Code Online (Sandbox Code Playgroud)
我找到了解决方案。我的一些实体正在使用属性“列”。就我而言,我使用的是[Column(TypeName = "Date")]. 当我删除这个属性后,我就可以在我的 Linux 服务器上运行实体框架了。
| 归档时间: |
|
| 查看次数: |
1556 次 |
| 最近记录: |