Hi all,
I've got my application here where literally every object has a lastUpdatedBy property. The information I put into here is the person's username, which is retrieved from the session("username") variable.
How can I pass this data to my DAL in the class library?
At first I was just passing in the value into each method, but this is ridiculous I thought, there should be no reason to do that every time a method is called.
Then I thought well if I just put it in a constructor for each of the DAL related classes, that will make it even easier.
However, even still on any given page, I've got a plethora of New() declarations, for which every single line I need to pass in the session username casted as a string.
Is there an even still more efficient way of doing this so that I could only declare this in one place, and everything will know what it is and I can pass it to classes in a class library?