public override void ReaderExecuted(System.Data.Common.DbCommand command, DbCommandInterceptionContext <System.Data.Common.DbDataReader> interceptionContext) { _stopwatch.Stop(); if (interceptionContext.Exception != null) { LogHelper.LogSql(string.Format("Exception:{1} \r\n --> Error executing command:\r\n {0}", command.CommandText, interceptionContext.Exception.ToString())); } else { LogHelper.LogSql(string.Format("\r\n执行时间:{0} 毫秒 \r\n -->ReaderExecuted.Command:\r\n{1}", _stopwatch.ElapsedMilliseconds, command.CommandText)); } base.ReaderExecuted(command, interceptionContext); }