コード例 #1
0
        /// <summary>
        /// Saves parameter Timing to the sqltimingparams collection.
        /// </summary>
        private void SaveSqlTimingParameters(MiniProfiler profiler, SqlTiming s)
        {
            foreach (var p in s.Parameters)
            {
                var sqltimingParamPoco = new SqlTimingParameterPoco
                {
                    MiniProfilerId    = profiler.Id.ToString(),
                    ParentSqlTimingId = s.Id.ToString(),
                    Name   = Truncate(p.Name, 150),
                    DbType = Truncate(p.DbType, 50),
                    Size   = p.Size,
                    Value  = p.Value
                };

                SqlTimingParams.Insert(sqltimingParamPoco);
            }
        }
コード例 #2
0
        /// <summary>
        /// Saves parameter Timing to the sqltimingparams collection.
        /// </summary>
        private void SaveSqlTimingParameters(MiniProfiler profiler, SqlTiming s)
        {
            foreach (var p in s.Parameters)
            {
                var sqltimingParamPoco = new SqlTimingParameterPoco
                {
                    MiniProfilerId = profiler.Id.ToString(),
                    ParentSqlTimingId = s.Id.ToString(),
                    Name = Truncate(p.Name, 150),
                    DbType = Truncate(p.DbType, 50),
                    Size = p.Size,
                    Value = p.Value
                };

                SqlTimingParams.Insert(sqltimingParamPoco);
            }
        }