0

I'm using Entity framework 5 with Oracle.ManagedDataAccess 19.11.0, and when i'm trying to add migration i'm getting this error :

    at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
    An error occurred while getting provider information from the database. 
This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.

my connection string is as below :

<add name="myDB" connectionString="Data Source=PAD;Persist Security Info=True;User ID=USRX;Password=XXXX;" />

please note that application works fine, only the add-migration that doesn't work .

user1187282
  • 1,137
  • 4
  • 14
  • 23
  • Make sure you have the latest Oracle Driver. Oracle recommends using their ODBC driver. Check in Control Panel : Admin Tools :ODBC data sources the driver you are using.. Here is link of Oracle connections string and drivers : https://www.connectionstrings.com/oracle/ – jdweng May 10 '21 at 09:40
  • @jdweng I don't think you can use Entity framework with ODBC with, see https://stackoverflow.com/questions/6717456/using-odbc-for-entity-framework-conneciton – Wernfried Domscheit May 10 '21 at 10:24
  • @WernfriedDomscheit so i can't use add-migration ? EF Code First . – user1187282 May 10 '21 at 11:41
  • You don't use ODBC, so the comment from jdweng is useless. – Wernfried Domscheit May 10 '21 at 12:00
  • Use driver for Entity Framemwork from following : https://www.oracle.com/database/technologies/appdev/dotnet/odp.html?force_isolation=true – jdweng May 10 '21 at 12:06

0 Answers0