Possible Duplicate:
How can I make the ASP.NET MVC mini profiler work with Linq 2 SQL?
This might be a duplicate of How can I make the ASP.NET MVC mini profiler work with Linq 2 SQL?, but none of the answers in that question are working for me.
I am using a DBML file (WebData.dbml) and its backing WebData.cs file as the models for my site. I added normanthesquid's code
public static WebDataContext CreateNewContext()
{
var sqlConnection = new WebDataContext().Connection;
var profiledConnection = MvcMiniProfiler.Data.ProfiledDbConnection.Get(sqlConnection);
return new WebDataContext(profiledConnection);
}
to the WebData.designer.cs file, but it's never getting called. What do I need to do to get it to be called?