Windows Oracle Data Access Components (MOSC)

MOSC Banner

Set ClientID while using Entity Framework 5

edited Apr 7, 2015 12:03PM in Windows Oracle Data Access Components (MOSC) 1 commentAnswered ✓

How do you set the ClientID on queries, updates and especially deletes while using Entity Framework?

We are able to set it when not using Entity Framework by doing the following:

using (OracleConnection oCon = new OracleConnection(connString))

{

     try

     {

          oCon.Open();

          oCon.ClientID = "jnelson";

...

However, we have not had success with this approach while using Entity Framework.

OracleConnection oCon = (OracleConnection)myEnt.Database.Connection;

try

{

     oCon.Open();

     oCon.ClientID = "jnelson";

...

When we use myEnt.SaveChanges() we do not get any errors but the USERENV CLIENT_IDENTIFIER comes across as null.

Any ideas would be appreciated.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center