我是从一个字preSS数据库,该数据库中的主键定义为十进制
,我使用该项目的64位配置...
位我搜索我发现它的问题,但我无法找到一个解决方案。
我有什么做/下载到能够使用十进制
作为主键?
这个问题在Microsoft Connect上
解决方案如果你只从表中读取数据,你可以尝试创建蒙上领域为int的视图,那么你的实体映射到视图。
除此之外,我认为你是pretty的多倒霉。这是在实体框架中的错误;要么改变字段类型,从EF转走,或等待MS修复的bug。
I am retrieving data from a wordpress database which defines the primary key as decimal
and I am using a x64 configuration on the project...
The bit I searched I found out that it is the problem, but I couldn't find a solution.
What do I have to do/download to be able to use decimal
as a primary key?
This issue on Microsoft Connect
解决方案If you're only reading data from the table you can try creating a view that casts the field to an int and then map your entity to the view.
Beyond that, I think you're pretty much out of luck. This is a bug in Entity Framework; either change the field type, switch away from EF, or wait for MS to fix the bug.