Database First dcOra v8 EF6: Error when generating Model from DB

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
kinl99
Posts: 3
Joined: Tue 22 Oct 2013 15:11

Database First dcOra v8 EF6: Error when generating Model from DB

Post by kinl99 » Wed 23 Oct 2013 06:15

Hi,

I use:

EntityFramework 6.0.1
dotConnect Oracle v8.0.17.6
Net 4.5.1
VS 2012 / 13 (same result in both versions)

when I try to generate a entity model from an existing Oracle DB(11i) using the MS VS EDM Wizard the following exception is thrown (after selecting the tables, so the DB Con itself is working fine):

Unable to generate the model because of the following exception: 'System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.InvalidOperationException: Unexpected System.Data.Entity version: '6.0.0.0'.
at Devart.Data.Oracle.Entity.a0.a(String A_0, String A_1)
at Devart.Data.Oracle.Entity.a0.i()
at Devart.Data.Oracle.Entity.a0.a(Int32 A_0)
at Devart.Data.Oracle.Entity.h.a(CommandBehavior A_0)
at Devart.Data.Oracle.Entity.h.b(CommandBehavior A_0)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<>c__DisplayClassb.<Reader>b__8()
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TInterceptionContext,TResult](Func`1 operation, TInterceptionContext interceptionContext, Action`1 executing, Action`1 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
--- End of inner exception stack trace ---
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.Execute(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Entity.Core.EntityClient.EntityCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.SchemaDiscovery.EntityStoreSchemaGeneratorDatabaseSchemaLoader.LoadDataTable[T](String sql, Func`2 orderByFunc, DataTable table, EntityStoreSchemaFilterObjectTypes queryTypes, IEnumerable`1 filters, String[] filterAliases)
at Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.SchemaDiscovery.EntityStoreSchemaGeneratorDatabaseSchemaLoader.LoadTableDetails(IEnumerable`1 filters)
at Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.SchemaDiscovery.EntityStoreSchemaGeneratorDatabaseSchemaLoader.LoadStoreSchemaDetails(IList`1 filters)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.GetStoreSchemaDetails(StoreSchemaConnectionFactory connectionFactory)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.CreateStoreModel()
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.GenerateModel(List`1 errors)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModels(String storeModelNamespace, List`1 errors)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModel(EdmxHelper edmxHelper)'.

Any ideas what could cause the problem?

Regards

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Database First dcOra v8 EF6: Error when generating Model from DB

Post by Shalex » Wed 23 Oct 2013 14:24

The support of EntityFramework v6.0.1 and VS 2013 RTM will be added in dotConnect for Oracle starting from the next public build. We will post here when it is available for download.

kinl99
Posts: 3
Joined: Tue 22 Oct 2013 15:11

Re: Database First dcOra v8 EF6: Error when generating Model from DB

Post by kinl99 » Fri 25 Oct 2013 07:33

Thanks for the clarification. Do you have an estimated release date for the new version yet?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Database First dcOra v8 EF6: Error when generating Model from DB

Post by Shalex » Fri 25 Oct 2013 09:50

We are going to release the new build of dotConnect for Oracle next week.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Database First dcOra v8 EF6: Error when generating Model from DB

Post by Shalex » Fri 01 Nov 2013 10:20

New version of dotConnect for Oracle 8.1 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=28241.

Be aware that you should add the following entry in your app.config manually if you want to work with EF6 using Entity Data Model (*.edmx) Wizard:

Code: Select all

  <entityFramework>
    <providers>
      <provider invariantName="Devart.Data.Oracle" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.1.26.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>
  </entityFramework>

Post Reply