public void CSharpTestOperation1_SmallTimeTrue_ShouldBeCapturedByProfiler()
        {
            using (perfLabs.Step(Profiler.MVCMiniProfiler, "CSharpTestOperation1"))
            {
                sampleCode.CSharpTestOperation1(true);
            }

            perfLabs.SaveToDataBase();

            using (var context = new Test_PerformanceLabsDBContext())
            {
                Int32 count = (from mpt in context.MiniProfilerTimings
                               where mpt.Name == "CSharpTestOperation1"
                               select mpt.Name).Count();
                Assert.AreEqual(count, 1);
            }
        }
        public void SqlConnectionTestOperation_SmallTimeTrue_SqlShouldBeCapturedByProfiler()
        {
            using (perfLabs.Step(Profiler.MVCMiniProfiler, "SqlConnectionTestOperation"))
            {
                sampleCode.SqlConnectionTestOperation(true);
            }

            perfLabs.SaveToDataBase();

            using (var context = new Test_PerformanceLabsDBContext())
            {
                Int32 count = (from mpct in context.MiniProfilerTimings
                               join mpst in context.MiniProfilerSqlTimings
                               on mpct.Id equals mpst.ParentTimingId
                               where mpct.Name == "SqlConnectionTestOperation"
                               select mpst.Id).Count();
                Assert.AreEqual(count, 1);
            }
        }