I have a WebApi setup and due to some reasons, I am facing performace issues with some of the api methods. I would like to use MiniProfiler and to test the performance of these API methods and log the statistics delivered by Miniprofiler in to a Table.
The miniprofiler docs asks to add the follwing code,
using StackExchange.Profiling.Data;
...
public static MyModel Get()
{
var conn = new EFProfiledDbConnection(GetConnection(), MiniProfiler.Current);
return ObjectContextUtils.CreateObjectContext<MyModel>(conn);
}
Can somebody help me where actually this needs to be added, how the table will be Created and configured?
N.B: I am using EF 5 with Object Context Database First approach(Not DbContext)