Skip to content

MiniProfiler Integration

LAP-CHRIS\chris edited this page Mar 10, 2026 · 1 revision

Language: English | Português (Brasil)

MiniProfiler Integration

The current packaged MiniProfiler adoption path is centered on DbSqlLikeMem.MySql.MiniProfiler, which lets MySQL-oriented test flows compose profiling with the same mock connection approach used in the core library.

When to use it

  • Your test setup already uses MiniProfiler
  • You want profiling around a MySQL mock connection
  • You also want to compose DbConnection Interception for recording, logging, or fault injection

Example

var profiled = new ProfiledDbConnection(
    new MySqlConnectionMock(new MySqlDbMock()),
    MiniProfiler.Current);

using var intercepted = profiled.WithInterception(options =>
{
    options.UseRecording();
    options.UseLogging(Console.WriteLine);
});

Related pages

Start in English

English

English Guided Walkthroughs

English Advanced Guides

English Providers

English Ecosystem

Português (Brasil)

Walkthroughs Guiados em Português

Guias Avançados em Português

Provedores em Português

Ecossistema em Português

Clone this wiki locally