MiniProfiler.Integrations
MiniProfiler.Integrations copied to clipboard
MiniProfiler, SQL Server, MySQL, Dapper and how to log all executed sql commands
trafficstars
MiniProfiler.Integrations
Provides a custom IDbProfiler implemenation to help you capture all sql commands that have been executed against a database, support SQL Server / MySQL out of the box and you can extend for your own database very easy.
On NuGet: MiniProfiler.Integrations / MiniProfiler.Integrations.MySQL
Usage
Setup is in 3 simple steps:
1. Install package via PM
Install-Package MiniProfiler.Integrations
2. Initialize connection with the custom profiler
var profiler = CustomDbProfiler.Current;
using (var dbConnection = ProfiledDbConnectionFactory.New(new SqlServerDbConnectionFactory(connectionString), profiler))
{
// DO YOUR WORKS
}
3. Get all commands executed (Success / Fail)
var commands = profiler.GetCommands();
Support
If you like this project then please consider a donation as a thank you.
