Peter Meinl
Peter Meinl

Reputation: 2586

How to trace DbQuery parameter values

We are tracing the generated SQL using qry.ToString. How can we trace the parameter values too.

DbQuery (in contrast to ObjectQuery) does not have a Parameters property.

Using SqlProfiler is not an option. We are tracing using log4net in production.

Upvotes: 1

Views: 360

Answers (1)

Peter Meinl
Peter Meinl

Reputation: 2586

For a workaround using reflection see Access to DbQuery parameters for logging. I made a feature request at CodePlex

Upvotes: 2

Related Questions