Reputation: 1224
I'm was told recently that in our current project we have to use Oracle instead of SQL Server.
I need some help to make it work. I've already installed Visual Studio ODTwithODAC but when I try to run the command update-database
in the Package Manager Console, the following error is thrown:
A null was returned after calling the 'get_ProviderFactory' method on a store provider instance of type 'System.Data.OracleClient.OracleConnection'. The store provider might not be functioning correctly.
I know that the problem is not the access to DB because I could connect to it via Server Explorer and I took the connection string from it.
My connection string goes like this:
<add name="LpssContext"
connectionString="SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.1.106)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)));uid=sys;pwd=sys;"
providerName="System.Data.OracleClient" />
Any ideas about what's wrong?
Does Oracle support code-first migrations?
Upvotes: 1
Views: 1780
Reputation: 1224
Currently there's no support for CFM with Oracle connector. There's a paid connector that support it though, http://blog.devart.com/entity-framework-code-first-migrations-support-for-oracle-mysql-postgresql-and-sqlite.html
The other option is to change your db layer to DB First (with lots of work) manually, as I finally did
Upvotes: 1