我有相當大的代碼庫使用各種不同的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