我有相当大的代码库使用各种不同的ADO技术(即一些EF,并且在某些情况下直接使用ADO.Net)。使用AOP技术来拦截ADO.Net
我不知道是否有任何方式在全球范围内拦截任何ADO.Net调用,这样我就可以开始审核信息等,其执行的确切的SQL语句,花费时间,结果返回等
主要的想法是,如果我能做到这一点,我不应该改变任何我现有的代码,并且我应该能够拦截/包装ADO.Net ...这可能吗?
编辑
它已经建议我考虑PostSharp,CciSharp或Afterthought,但我要如何使用其中的一个来得到想要的结果?
似乎是一个多余的问题。 [PostSharp](http://stackoverflow.com/questions/5885886/using-postsharp-to-intercept-ado-net),[AOP](http://stackoverflow.com/questions/5870539/using-aop-techniques -to-intercept-ado-net),[CciSharp](http://stackoverflow.com/questions/5885904/using-ccisharp-to-intercept-ado-net),[EF](http://stackoverflow.com/questions/5885929/using-afterthought-to-intercept-ado-net) - **相反,只要提出一个问题并涵盖所有方面。** – 2011-05-07 22:18:18
@rockinthesixstring请不要投我我的票,请删除您的评论。我被要求做到这一点(阅读评论!) - http://stackoverflow.com/questions/5870539/using-aop-techniques-to-intercept-ado-net – 2011-05-07 22:48:08