1

我有VS2K12一个.edmx file使用dotConnect 7.2.96.0. 我有一些uTests像魅力一样对抗数据库的东西。

如果我更改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.

其中几个。欢迎任何帮助。

4

1 回答 1

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

于 2013-07-05T13:40:49.920 回答