I'm working on upgrade of our WebAPI and have an issue - how to execute the controller action from my code.
- I checked following question: how to call another controller action from a controller in mvc but this method skips execution of AuthorizationAttribute which is critical for my application, and don't validate request before execution.
- Another method is to use HttpClient to execute method. Which is working fine except it can't reuse data from common services which were retrieved in my current object but have to retrieve them again (services added as scoped so available only during request) which is not good for performance.
I would like to execute my controller action with all attributes and validation but also want to reuse service data received from previous call.