I'm currently trying to add MiniProfiler (v4) to a WebForms/MVC hybrid application and when trying to fit it into some older ADO.NET calls it isn't showing the timing of the profiled queries. It always shows 0.0ms. Our newer calls using Dapper are showing proper timings. Can anyone help me figure out what I'm doing wrong?
using (var con = GetDatabaseConnection(command.Connection?.ConnectionString)) // returns new ProfiledDbConnection based on connection string
{
DbCommand cmd = GetDbCommand(con, command); // Creates DbCommand, using connection.CreateCommand() and data from a passed in SqlCommand object
using (var da = new ProfiledDbDataAdapter(new SqlDataAdapter()))
{
da.SelectCommand = cmd;
con.Open();
da.Fill(dataSet);
}
}