Hoping someone has done this before...
My app has a main screen where a user selects a company and a contact within that company. From there, the user gets access to a collection of pages that shows (read-only) views of various bits of data.
I need to hold on to the CompanyID and the ContactID across all these pages. All of the pages use at the very least the CompanyID. Both are string values.
I thought at first I would use Session, so I loaded up the extended package, configured it in Startup and found that I could not use it - mainly because I can't change the constructor signature for any of the .RAZOR.CS files. If I could, then I could possibly use dependency injection to get to the Session object.
I also am not able to see/set a TempData object from the .RAZOR.CS files.
And I can't get to the HttpContext object because, again, no way to use dependency injection so no way to get to a non-null version of that object (and I think it is already out of scope by the time the .RAZOR.CS class is called).
I don't have any way to identify the user so I can't use a cache. I need some way for the user to identify themselves, and as this app is using AD authentication, I just know they are authenticated, not who they are.
There has got to be a way to do this on a per-user basis. Anyone have any ideas how to do this?