in Education by
I have quite a large code base using a variety of different ADO technologies (i.e. some EF and in some cases using ADO.Net directly). I'm wondering if there is any way to globally intercept any ADO.Net calls so that I can start auditing information like, exact SQL statements that executed, time taken, results returned, etc. The main idea being that if I can do this, I shouldn't have to change any of my existing code and that I should be able to just intercept/wrap the ADO.Net... Is this possible? EDIT Its been suggested that I look into PostSharp, CciSharp or Afterthought, but how do I use one of these to get the desired results? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
No. If you're coding directly against ADO.NET types you can't just tell DynamicProxy: "hey, put a proxy wherever I use SqlConnection in all these DLLs". DynamicProxy is a runtime proxy generator. It seems that you want post-compilation AOP, so look into PostSharp, CciSharp or Afterthought instead. EDIT: if none of those tools are enough, you could use Mono.Cecil to directly alter your IL, but it's not easy. See for example: http://www.codethinked.com/static-method-interception-in-net-with-c-and-monocecil How to inject call to System.Object.Equals with Mono.Cecil?

Related questions

0 votes
    I am new to Spring AOP. Using annotation based Spring configuration: @Configuration @EnableAspectJAutoProxy( ... Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 8, 2022 in Education by JackTerrance
0 votes
    I have been able to define multiple aspects (one is @Before and another is @Around) using Spring AOP ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 18, 2022 in Education by JackTerrance
0 votes
    What are the Navigations techniques in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    How do I use the CAST in ADO to convert Float values to String? I tried SELECT CAST([Field] AS ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    I have an aspect advice like following @AfterReturning("execution(* de.ojk.platform.servicelayer.session. ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    What is Aspect oriented programming(AOP)?...
asked Nov 7, 2020 in Technology by JackTerrance
+1 vote
    What AOP stands for in Spring? A - Aspect Oriented Programming B - Any Object Programming C - Asset Oriented Programming D - Asset Oriented Protocol...
asked Oct 14, 2020 in Technology by JackTerrance
0 votes
    The parameter β0 is termed as intercept term and the parameter β1 is termed as slope parameter. These parameters ... of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    Which of the following is a tool to monitor outgoing traffic of target PC's email and intercept all the ... -for-Cyber Security:,Cyber Security-Jobs:,Cyber Security Applications...
asked Nov 1, 2021 in Education by JackTerrance
0 votes
    Which of the following patsy formula ignores the intercept? (1)y ~ x1 + x2 (2)y ~ x1 + x2 + x1*x2 (3)y ~ -1 + x1 (4)y ~ x1...
asked Aug 10, 2021 in Technology by JackTerrance
0 votes
    What happens when Intercept is off? A.) The request will hit the server B.) The request will hit the proxy C.) Hit the proxy...
asked Apr 29, 2021 in Technology by JackTerrance
0 votes
    Which of the following are threat hunting techniques? A. Stack counting B. Clustering C. Grouping D. All the Options...
asked Feb 26, 2023 in Technology by JackTerrance
0 votes
    How many flips does the simplest of pancake sorting techniques require? a) 3n−3 flips b) 2n-4 flips c) 2n-3 flips d) 3n-2 flips...
asked Dec 28, 2022 in Technology by JackTerrance
0 votes
    Which of the following technique/techniques is/are used by Einstein on Data to turn them into insights? A. Automate B. Recommend C. Discover D. Predict E. All the options...
asked Nov 1, 2022 in Education by JackTerrance
...