From c2598024a4a9d4075122b029bf82a28ec8e8b052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20G=C3=BCng=C3=B6r?= <47147484+furkandeveloper@users.noreply.github.com> Date: Wed, 28 Oct 2020 00:18:17 +0300 Subject: [PATCH] Update README.md --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/README.md b/README.md index 2c2faca..190e204 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,45 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, Profiler Run your application and check your db. Must be created `Profiler` entity. +### Sample for MariaDb +Install `EasyProfiler.MariaDb` from [Nuget Package](https://www.nuget.org/packages/EasyProfiler.MariaDb/) + +Initilaze `EasyProfilerDbContext` in `Startup.cs` to save the results. +#### Sample +```csharp +services.AddEasyProfilerDbContext(options => +{ + options.UseMySql(Configuration.GetConnectionString("DefaultConnection")); +}); +``` + +and `EasyProfilerInterceptor` extensions add for own `DbContext`. + +#### Sample +```csharp +services.AddDbContext(options => +{ + options.UseMySql(Configuration.GetConnectionString("DefaultConnection")) + .AddEasyProfiler(services); +}); +``` + +### Migrations +Use the `ApplyEasyProfilerMariaDb` extension method for pending migrations. + +#### Sample + +```csharp +public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ProfilerDbContext profilerDbContext) +{ + app.ApplyEasyProfilerMariaDb(profilerDbContext); +} +``` + +
+ +Run your application and check your db. Must be created `Profiler` entity. + ## Watch Queries with AdvancedFilter #### Usage