I've been trying out MvcMiniProfiler as replacement for EFTracingProvider since it's so much simpler to configure.
It will display the sql just fine, but I'd like to see the parameter values as well.
insert [dbo].[PersonName]([Prefix], [GivenName], [MiddleName], [FamilyName], [Affix])
values (@0, @1, @2, @3, @4)
select [Id]
from [dbo].[PersonName]
where @@ROWCOUNT > 0 and [Id] = scope_identity()
Can MvcMiniProfiler display sql parameter values?
Here's my Global.asax. I'm using EF 4.3.1 with code-first.
protected void Application_Start()
{
Bootstrapper.Initialize();
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
MiniProfilerEF.Initialize();
}
protected void Application_BeginRequest()
{
if (Request.IsLocal)
{
MiniProfiler.Start(ProfileLevel.Verbose);
}
}
protected void Application_EndRequest()
{
MiniProfiler.Stop();
}
If you want the SQL Server Formatter, try adding:
MiniProfiler.Settings.SqlFormatter =
new StackExchange.Profiling.SqlFormatters.SqlServerFormatter();
In Application_Start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With