I need to pass some parameters from middleware to controller and I'm confused which approach should I use if I have to take care of performance, resource usage and security.
context.Items["user-id"] = "12345";context.Session.SetInt32("user-id", 12345);
(It is the requirement to keep the Session enabled anyway.)