I am in the process of creating an api for database operations where I have to wrap every function call in the api with a try catch. I am basically trying to get the same functionality as decorators in python.
I read a bunch of articles and this one seemed like the best example to follow: http://ayende.com/blog/3474/logging-the-aop-way. A problem I have with it is that after resolving the container with the interface of functions that need to be wrapped, you have to make a call on the resolved container to call one of those functions.
I would like the user of my controller to be able to just make a call to my class which implements the above interface and know nothing about what I have done internally as far as the try catch business.
Is this possible? I apologize if the solution is simple, I haven't had much experience with C#. Thanks.