Hello,
I am trying to get Code First Migrations working with Entity Framework 6 and ODAC 12c R3 Beta.
Everything seems to be ok when working with Package-Manager-Console.
I can enable migrations, add code based migrations and update them to my Oracle Database.
But I can't switch to another empty schema and apply my migrations there from code.
I do it the same way as I succeeded with MSSQL and MySql.
I am working with MigrateDatabaseToLatestVersion - Initializer and I call Database.CreateIfNotExists() on first DB-Access. This way, by launching my application, I get my MSSQL- and MySQL-Databases up to date and even created when not existing.
On Oracle I get the following Exception:
'Unable to complete operation. The supplied SqlConnection does not specify an initial catalog or AttachDBFileName.'
I even get this exception when connection to the Database that got already updated by Package-Manager-Console and is already up to date.
As you can guess from the Exception Text, it is thrown by the SqlServer-Provider (EntityFramework.SqlServer).
Of course I have the right provider configured in my app.config
<provider invariantName="Oracle.DataAccess.Client" type="Oracle.DataAccess.EntityFramework.EFOracleProviderServices, Oracle.DataAccess.EntityFramework, Version=6.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
and my ConnectionString looks valid, too...
<add name="..." providerName="Oracle.DataAccess.Client" .../>
So why is the SqlProvider going to be used? Thanks for your help.