abe545 / CodeOnlyStoredProcedures

A library for easily calling Stored Procedures in .NET using only code (no xml or gui).
MIT License
4 stars 3 forks source link

How to use Context_info. #58

Closed dineshkumarsek closed 8 years ago

dineshkumarsek commented 8 years ago

my application is having audit for table changes.On Trigger i am getting logged user from context_info before this call .i am setting context_info but i can't get context_info on trigger. my code db.Execute().SetLoggedUserinternalID_SP(new { Logged_UserInternalID = 10 }); return StoredProcedure.Create("Notice_SP").WithInput(objModel).WithResults().Execute(db);

abe545 commented 8 years ago

Could you show me how you set the context_info? I've not used that before.

The library will clone the connection before using it (to avoid problems I encountered while sharing the connection with Entity Framework), so my guess is that this value is not being cloned by the connection itself, and we'd have to add code to do so manually.