public void Save(DbCommand command, ICommandTraceEntry traceEntry) { if (traceEntry is null) { throw new ArgumentNullException(nameof(traceEntry)); } if (command is null) { throw new ArgumentNullException(nameof(command)); } if (!(command is SqlCommand)) { throw new InvalidOperationException("Command is no SqlCommand."); } var tsql = new TSqlCommandToTextTranslator() .Translate((SqlCommand)command); Save(tsql, command, traceEntry); }
protected override void Save(string tsql, DbCommand command, ICommandTraceEntry traceEntry) { }
protected abstract void Save(string tsql, DbCommand command, ICommandTraceEntry traceEntry);