Question

I have an MVC 4 web application with EF 5 CodeFirst (DBContext) with migrations. I am using SimpleMembership which is tied in through EF 5. My database is SQL Server 2012 and I do not have the permission to create and drop databses so because of this I specify the database name.

I have looked at multiple sites to set up MiniProfiler and I am having trouble putting 2 and 2 together. Here are my questions:

1) Can I use MiniProfiler with EF 5 (DBContext), SimpleMembership, and specify the database name? 2) If this is possible can you please provide a walk through for me. Please be specific as I am new to this. My DBContext is set up in this manner:

public class DataContext : DbContext
{
    public DataContext() : base("DatabaseNameHere")
    { }

    public DbSet<Table1> Table1 { get; set; }
    public DbSet<Table2> Table2 { get; set; }    
}
Was it helpful?

Solution

OK after much digging around I found the solution. As stated by the comment above this does work. Here is the link to a walk through that helps out.

http://www.codeproject.com/Articles/516627/MiniProfilerplus-plusInstallationplusandplusSetup

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top