Open Closed

Connection to Oracle Database #7474


0
maharatha created

I am currently using two database context to connect to two different MS SQL database. Database 1 : Aspnet Zero database Database 2 - Anothe SQL database where I get and update data

Now I want to add a Third database which is an Oracle database.

I have added the nuget package https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core/ in the EntityFramework.Core project.

After that I am not sure how to proceed.

 public class ThirdDbContextConfigurer
    {
        public static void Configure(DbContextOptionsBuilder<ThirdDbContext> builder, string connectionString)
        {
            
            builder.xxxxxxxx(connectionString);
        }

        public static void Configure(DbContextOptionsBuilder<ThirdDbContext> builder, DbConnection connection)
        {
            builder.xxxxxx(connection);
        }
    }

I was expecting oracle to show up in the builder.XXXXX.

Am i missing something ?


1 Answer(s)
  • 0
    ryancyq created

    Hi, the nuget you haved linked above was only the data access lib to oracle database.

    To access oracle database via Ef Core, you should use https://www.nuget.org/packages/Oracle.EntityFrameworkCore/