当前位置:编程学习 > C#/ASP.NET >>

EntityFramework 和 Oracle 的问题

不知道这里有没有能人,我们现在有一个问题

大部分 table 都用 number(1,0) 来表示 boolean

当使用 oracle entity framework 的时候,我们可以在 app.config 里加入

<oracle.dataaccess.client>
<settings> 
<add name="bool" value="edmmapping number(1,0)" />
</settings>
</oracle.dataaccess.client>

这样 edmx 就可以使用 bool 

但是我们突然发现原来有很少一部分是用来储存 1-9 的数字的,比如 DayofWeek (我们不能改变这些 table,因为都是一些 legacy 的系统)。几百个表里,我们现在只暂时见到有一个表是这样的

当遇到这样的情况的时候,系统就会出现

Error 2019: Member Mapping specified is not valid. The type 'Edm.Int16[Nullable=True,DefaultValue=]' of member 'DayOfWeek' in type 'xxx' is not compatible with 'OracleEFProvider.number[Nullable=True,DefaultValue=,Precision=1,Scale=0]' of member 'DAY_OF_WEEK' in type 'yyy'.

有人解决过这样的问题吗?

谢谢
--------------------编程问答-------------------- 我遇到类似的问题了
补充:.NET技术 ,  .NET Framework
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,