/// <summary> /// Saves parameter Timing to the sqltimings collection. /// </summary> private void SaveSqlTiming(MiniProfiler profiler, SqlTiming s) { var sqlTimingPoco = new SqlTimingPoco { Id = s.Id.ToString(), MiniProfilerId = profiler.Id.ToString(), ParentTimingId = s.ParentTiming.Id.ToString(), ExecuteType = s.ExecuteType, StartMilliseconds = (double)s.StartMilliseconds, DurationMilliseconds = (double)s.DurationMilliseconds, FirstFetchDurationMilliseconds = (double)s.FirstFetchDurationMilliseconds, IsDuplicate = s.IsDuplicate, StackTraceSnippet = Truncate(s.StackTraceSnippet, 200), CommandString = s.CommandString }; SqlTimings.Insert(sqlTimingPoco); if (s.Parameters != null && s.Parameters.Count > 0) { SaveSqlTimingParameters(profiler, s); } }