Let's say I have a controller that does a thing. This thing needs to be logged, however, I'd like to log it into a database that's accessible through the API, so it is also a controller with a service, repository, and validation.
I have a LoggerService
that should update its database by LoggerService.UpdateAsync()
, but it's not instantiated in the controller that needs to be logged. How would I do that?