I want to be able to update my entities with the UserId of the person editing them via my web application. I have this information available in the Session, but it seems that I have no way to get this information to the code. What I DON'T want to do is set the value in each of the 500 places I call Save() on my entities.
I have implemented a Validator w/ Dependency Injection and it works great. I thought that I would be able to do it there, but something wierd is happening... In my Validator class, I have:
public delegate HttpSessionState GetWebSession_Delegate();
public static GetWebSession_Delegate GetWebSessionState = null;
and then in my Application_Start, I set the GetWebSessionState delegate function. But when the Validator is executing, it is null.
Any suggestions?