In .Net framework I use MiniProfiler for MySql connection command logging. In my current AspNetCore solution MiniProfiler doesn't show sql commands as well. What MiniProfiler options I should be using to log it?
MiniProfiler for AspNetCore MySql connection
319 Views Asked by Valery Yegorov At
2
There are 2 best solutions below
0

Thanks, It is not for Entity Framework, but solution is using MiniProfiler to profile MySQL Server. And the connection is wrap as following:
public DbConnection GetConnection()
{
DbConnection connection = new System.Data.SqlClient.SqlConnection("...");
return new StackExchange.Profiling.Data.ProfiledDbConnection(connection, MiniProfiler.Current);
}
But this does not help, as it does not capture actual SQL command with the parameter list. Please suggest if any additional options need to be configured.
If you're using Entity Framework Core, you need to:
Startup.cs
, callAddEntityFramework()
:Source: MiniProfiler documentation