An open API service indexing awesome lists of open source software.

https://github.com/vndevpro/miniprofiler.integrations

MiniProfiler, SQL Server, MySQL, Dapper and how to log all executed sql commands
https://github.com/vndevpro/miniprofiler.integrations

dapper logging miniprofiler mysql sql-server

Last synced: 21 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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](https://www.nuget.org/packages/MiniProfiler.Integrations/) / [MiniProfiler.Integrations.MySQL](https://www.nuget.org/packages/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.