我想知道是否有去允许跟踪/诊断上通过app.config文件的SQLConnection很像你可以用,当你需要跟踪的支持(如下图)WCF?
Hi i was wondering if there is away to allow tracing / diagnostics on a SQLConnection via the app.config file much like you can with WCF when you need tracing support (as below)?
<system.diagnostics>
<switches>
<add name="DataMessagesSwitch" value="0" />
<add name="TraceLevelSwitch" value="0" />
</switches>
</system.diagnostics>
我试图拦截和记录从我的应用程序SQL请求(无需创建的IDbConnection垫片过的SQLConnection捕捉到的请求,因为他们执行)
I'm trying to intercept and log SQL requests from within my application (without needing to create an IDBConnection shim over a SQLConnection to capture the requests as they are executed)
有什么想法?
ADO .NET技术文章:跟踪数据访问帮助吗?