EF6 support

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
quip85673456
Posts: 13
Joined: Mon 18 Apr 2011 16:37

EF6 support

Post by quip85673456 » Wed 31 Oct 2012 18:02

For a few crazy reasons I'm trying to use EF6 from codeplex. However, an exception is thrown when trying to build the model:
No Entity Framework provider found for 'Devart.Data.Oracle' ADO.NET provider. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.


According to http://go.microsoft.com/fwlink/?LinkId=260882, the database providers have to be rebuilt against EF6.

So heads up if you didn't have this on your dev to-do list.

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

Re: EF6 support

Post by Shalex » Thu 01 Nov 2012 13:41

The EF6 support is on our roadmap. We will post here when it is implemented.

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

Re: EF6 support

Post by Shalex » Thu 17 Jan 2013 17:46

Entity Framework 6 Alpha 2 is supported in the new version of dotConnect for Oracle 7.5!
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=25664.

John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

Re: EF6 support

Post by John Liu » Fri 01 Feb 2013 17:08

I got the exact same error message after I installed version 7.5.164.
I've used EF4.4 and the trial version of dotConnect for oracle. Everything worked fine. I recently purchased version 7.5. I uninstalled the trial version and reinstalled version 7.5 to work with EF 6 Alpha 2. my connection string is
<connectionStrings>
<add name="MYDBContext" connectionString="user id=user1;server=192.168.20.186;direct=True;sid=MYDB;Password=pass1;" providerName="Devart.Data.Oracle" />
</connectionStrings>
The error messages are

PM> get-migrations
Retrieving migrations that have been applied to the target database.
System.InvalidOperationException: No Entity Framework provider found for 'Devart.Data.Oracle' ADO.NET provider. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
at System.Data.Entity.Config.ProviderServicesFactory.GetInstanceByConvention(String providerInvariantName)
at System.Data.Entity.Config.DefaultProviderServicesResolver.GetService(Type type, Object key)
at System.Data.Entity.Config.CachingDependencyResolver.<>c__DisplayClass1.<GetService>b__0(Tuple`2 k)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at System.Data.Entity.Config.CachingDependencyResolver.GetService(Type type, Object key)
at System.Data.Entity.Config.ResolverChain.<>c__DisplayClass3.<GetService>b__0(IDbDependencyResolver r)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at System.Data.Entity.Config.ResolverChain.GetService(Type type, Object key)
at System.Data.Entity.Config.RootDependencyResolver.GetService(Type type, Object key)
at System.Data.Entity.Config.ResolverChain.<>c__DisplayClass3.<GetService>b__0(IDbDependencyResolver r)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at System.Data.Entity.Config.ResolverChain.GetService(Type type, Object key)
at System.Data.Entity.Config.CompositeResolver`2.GetService(Type type, Object key)
at System.Data.Entity.Config.IDbDependencyResolverExtensions.GetService[T](IDbDependencyResolver resolver, Object key)
at System.Data.Entity.Config.InternalConfiguration.GetService[TService](Object key)
at System.Data.Entity.Config.DbConfiguration.GetService[TService](Object key)
at System.Data.Entity.Utilities.DbProviderFactoryExtensions.GetProviderServices(DbProviderFactory factory)
at System.Data.Entity.Infrastructure.DefaultManifestTokenService.GetProviderManifestToken(DbConnection connection)
at System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest)
at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
at System.Data.Entity.Internal.LazyInternalContext.get_CodeFirstModel()
at System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext context, XmlWriter writer)
at System.Data.Entity.Utilities.DbContextExtensions.<>c__DisplayClass1.<GetModel>b__0(XmlWriter w)
at System.Data.Entity.Utilities.DbContextExtensions.GetModel(Action`1 writeXml)
at System.Data.Entity.Utilities.DbContextExtensions.GetModel(DbContext context)
at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration, DbContext usersContext)
at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration)
at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.GetMigrator()
at System.Data.Entity.Migrations.Design.ToolingFacade.GetDatabaseMigrationsRunner.RunCore()
at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
No Entity Framework provider found for 'Devart.Data.Oracle' ADO.NET provider. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

Re: EF6 support

Post by John Liu » Fri 01 Feb 2013 23:20

Figured out the problem after I read this post
http://blogs.devart.com/dotconnect/enti ... force.html

John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

Re: EF6 support

Post by John Liu » Thu 07 Feb 2013 00:34

After I moved to EF6, this setting config.CodeFirstOptions.ColumnTypeCasingConventionCompatibility = true;
doesn't work anymore. I got the following error message I had before.

PM> update-database -verbose
Using StartUp project 'Cityworks.DataAccess'.
Using NuGet project 'Cityworks.DataAccess'.
Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
Target database is: '' (DataSource: 192.168.20.86, Provider: Devart.Data.Oracle, Origin: Configuration).
Applying explicit migrations: [201302070024129_V20120100].
Applying explicit migration: 201302070024129_V20120100.
System.InvalidOperationException: Index name 'IX_CONTRACTATTACHMENT_CONTRACTID' in table AZTECA.CONTRACTATTACHMENT is too long (32 characters). An identifier with more than 30 characters was specified.
at Devart.Common.Entity.Migrations.f.a(String A_0, String A_1, String A_2)
at Devart.Common.Entity.Migrations.f.a(bz A_0)
at Devart.Common.Entity.bz.a(ba A_0)
at Devart.Common.Entity.Migrations.e.a(IEnumerable`1 A_0)
at Devart.Common.Entity.Migrations.c.a(IEnumerable`1 A_0, String A_1)
at Devart.Data.Oracle.Entity.Migrations.OracleEntityMigrationSqlGenerator.Generate(IEnumerable`1 migrationOperations, String providerManifestToken)
at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, XDocument targetModel, IEnumerable`1 operations, Boolean downgrading, Boolean auto)
at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration)
at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ApplyMigration(DbMigration migration, DbMigration lastMigration)
at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
at System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update(String targetMigration)
at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.RunCore()
at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
Index name 'IX_CONTRACTATTACHMENT_CONTRACTID' in table AZTECA.CONTRACTATTACHMENT is too long (32 characters). An identifier with more than 30 characters was specified.

John Liu
Posts: 61
Joined: Wed 14 Nov 2012 20:58

Re: EF6 support

Post by John Liu » Thu 07 Feb 2013 18:28

Never mind! It works as before!!!
Thanks

Post Reply