项目作者: vndevpro

项目描述 :
MiniProfiler, SQL Server, MySQL, Dapper and how to log all executed sql commands
高级语言: C#
项目地址: git://github.com/vndevpro/MiniProfiler.Integrations.git
创建时间: 2015-12-15T09:29:22Z
项目社区:https://github.com/vndevpro/MiniProfiler.Integrations

开源协议:

下载


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

  1. Install-Package MiniProfiler.Integrations

2. Initialize connection with the custom profiler

  1. var profiler = CustomDbProfiler.Current;
  2. using (var dbConnection = ProfiledDbConnectionFactory.New(new SqlServerDbConnectionFactory(connectionString), profiler))
  3. {
  4. // DO YOUR WORKS
  5. }

3. Get all commands executed (Success / Fail)

  1. var commands = profiler.GetCommands();

Support

If you like this project then please consider a donation as a thank you.