Skip to content

MiniProfiler, SQL Server, MySQL, Dapper and how to log all executed sql commands

Notifications You must be signed in to change notification settings

slemvs/MiniProfiler.Integrations

 
 

Repository files navigation

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.

About

MiniProfiler, SQL Server, MySQL, Dapper and how to log all executed sql commands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 60.3%
  • C# 39.7%