Hoboly
asked on
How do I create a new sql server session in entity framework?
How do I create a new sql server session in entity framework?
Thanks~
Thanks~
ASKER
sorry, All I need is to change @@SPID, not @@SSPI
Perhaps what you are requesting is not what you really need? What are you trying to accomplish? Multi-threading?
ASKER
I am using asp.net mvc + entity framework to make a website.
different users(not domain/windows user) can login.
For each table, there is a trigger. It records every changes.
The trigger uses the @@SPID to distinguish different users.
However, I found that the entity framework re-use the same connection and same session.
so @@SPID cannnot distinguish between users.
different users(not domain/windows user) can login.
For each table, there is a trigger. It records every changes.
The trigger uses the @@SPID to distinguish different users.
However, I found that the entity framework re-use the same connection and same session.
so @@SPID cannnot distinguish between users.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am using entity framework to update the table directly.
do you mean that I need to pass the username by stored procedure updating the table?
do you mean that I need to pass the username by stored procedure updating the table?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER