protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior) { var sw = Stopwatch.StartNew(); var reader = _command.ExecuteReader(behavior); _hooks.CommandExecuted(this, _context, sw.ElapsedMilliseconds); return(reader); }
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior) { var start = Stopwatch.GetTimestamp(); var reader = _command.ExecuteReader(behavior); _hooks.CommandExecuted(this, _context, GetElapsedMilliseconds(start, Stopwatch.GetTimestamp())); return(reader); }
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior) { var sw = Stopwatch.StartNew(); try { return(_command.ExecuteReader(behavior)); } finally { _hooks.CommandExecuted(this, _context, sw.ElapsedMilliseconds); } }