开发者

Logging queries with Enterprise Library

I'm using Microsoft.Practices.EnterpriseLibrary.Data.Database to create my accessors and execute my queries.

I'd like to know if there is anyway,开发者_如何学编程 within this scenario, to automatically log all queries and parameters that are being sent to the database.


There's nothing built into Entlib that does this. However, you can get the same information from the database side using Sql Profiler, if you're using Sql Server anyway. I expect that other databases have similar tools, but I don't know enough about them.

Accessors don't actually generate sql anyway, they just run the sql (or stored proc) that you hand to them, so there's not a whole lot to log.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜