Hi there!
How do I set the ClientInfo using EF as I could do using an OracleConnection?
Could it be set in the connection string?
Best regards,
cew3
How to set ClientInfo using Entity Framework?
Re: How to set ClientInfo using Entity Framework?
There is the ClientId parameter in connection string: https://www.devart.com/dotconnect/oracl ... tring.html. Is that what you need?
Re: How to set ClientInfo using Entity Framework?
You're right. There is a parameter ClientId. But as described in:Shalex wrote: ↑Thu 29 Nov 2018 20:03 There is the ClientId parameter in connection string: https://www.devart.com/dotconnect/oracl ... tring.html. Is that what you need?
https://www.devart.com/dotconnect/oracl ... mbers.html
- ClientId:
This property specifies the client identifier for the connection. It helps to make audition of the client connections and gives an opportunity to distinguish between the applications connecting to.
- ClientInfo:
Gets or sets the client information for the connection.
Best regards,
cew3
Re: How to set ClientInfo using Entity Framework?
Hello?
Anybody out there?
Anybody out there?
Re: How to set ClientInfo using Entity Framework?
You are working with EF4 and ObjectContext, aren't you?
Please use this approach:
Please use this approach:
Code: Select all
using (var myObjectContext = new MyEntities())
{
var conn = (myObjectContext.Connection as System.Data.EntityClient.EntityConnection).StoreConnection as OracleConnection;
conn.Open();
conn.ClientInfo = "abcd";
// work with myObjectContext
conn.Close();
}