Closed raidken closed 2 years ago
I'm not sure what you're trying to do.
If you are trying to log your database calls, I'd recommend a logging proxy (EventSourceProxy or something based on castle).
If you are trying to diagnose mapping problems, there's probably an easier way to solve the problem if you post more information.
I need to log database calls along with the parameters passed in the database calls. Especially in the catch block for db calls, need to capture the actual parameters passed into the stored proc call.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the question
How can I get a handle over the the parameter values mapped for any stored procedure or SQL call. I want to log the mapped parameter
public interface IProductRepo { [Sql("[spGetSimilarProducts]")] IList GetSimilarProducts(Product product);
}
Product product = new Product(){ ..... };
productRepo.GetSimilarProducts(product);
//How do I get the actual parameter bound to the call the stored proc?
Steps to reproduce (if applicable)