我有一个VS2K12
解决方案,其中使用.edmx file
dotConnect
连接了ORACLE数据库优先7.2.96.0
。我有一些uTests
像魅力一样对抗DB。
如果我将Entity Framework
的版本(从版本4更改为5)并将项目更新为Framework 4.5
,则解决方案会进行编译,但uTests
会在尝试时失败并显示以下错误获取数据库的上下文:
`System.Data.MetadataException was unhandled by user code
HResult=-2146232007
Message=Schema specified is not valid. Errors:
AlertingData.ssdl(54,6) : error 0040: The Type NVARCHAR2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
AlertingData.ssdl(57,6) : error 0040: The Type TIMESTAMP WITH LOCAL TIME ZONE is not qualified with a namespace or alias. Only primitive types can be used without qualification.
其中几个。欢迎任何帮助。
答案 0 :(得分:2)
请在首次使用上下文之前设置“ColumnTypeCasingConventionCompatibility = false”(例如:在部分类的静态构造函数中)或* .config:
<configuration>
<configSections>
<section name="Devart.Data.Oracle.Entity" type="Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfigurationSection,
Devart.Data.Oracle.Entity, Version=7.2.96.0, Culture=neutral,
PublicKeyToken=09af7300eec23701" />
</configSections>
<Devart.Data.Oracle.Entity xmlns="http://devart.com/schemas/Devart.Data.Oracle.Entity/1.0">
<CodeFirstOptions ColumnTypeCasingConventionCompatibility="false"/>
</Devart.Data.Oracle.Entity>
</configuration>
有关详细信息,请参阅http://www.devart.com/dotconnect/oracle/docs/?CodeFirstOptions.html。