How to register generated SQL queries from Simple.Data ORM for .NET.

How to record generated sql queries (without mysql profiler)?

I am using Simple.Data.Mysql

+8
source share
2 answers

You have a couple of options here. You can either configure a trace listener like this, and then yes, it will appear in the VS output window.

<configuration> <system.diagnostics> <switches> <add name="Simple.Data" value="Info" /> </switches> </system.diagnostics> </configuration> 

Or you can also look at ExampleRunner and ExampleTestListener in Simple.Data.Sample for an example of setting it in code.

+13
source share

All generated SQL statements (plus parameter values) are written to Trace by default, so you can simply attach a listener.

+3
source share

All Articles