Search code examples
oracleentity-frameworkroles

ORACLE SET ROLE with EF Core


Using Oracle, we have a very important Oracle connection security tool that is

SET ROLE role IDENTIFIED BY password

Note that it is not the Add Role of navigation used in Identity, but the ROLE of the ORACLE connection.

I'm having a hard time finding how to use this command with EntityFrameworkCore.

Does anyone know how to do this?

Or at least how to get the Oracle connection so that I can run the command explicitly.


Solution

  • Try .FromSql like this.

    Executing Raw SQL Queries