Skip to content

About

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

Topics

Resources

Stars

40 stars

Watchers

2 watching

Forks

Repository files navigation

MiniProfiler.Integrations

MiniProfiler.Integrations provides a custom IDbProfiler implementation that records successfully executed and failed database commands, including command text, parameters, database and connection details, and errors. The core package includes a SQL Server connection factory. Install MiniProfiler.Integrations.MySql for MySQL support, or implement IDbConnectionFactory to integrate another provider.

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

Topics

Resources

Stars

40 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages