public static void WriteCommandAfter(this DiagnosticListener @this, Guid operationId, SqlCommand sqlCommand, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlAfterExecuteCommand))
{
@this.Write(
SqlAfterExecuteCommand,
new
{
OperationId = operationId,
Operation = operation,
ConnectionId = sqlCommand.Connection?.ClientConnectionId,
Command = sqlCommand,
Statistics = sqlCommand.Statistics?.GetDictionary(),
Timestamp = Stopwatch.GetTimestamp()
});
}
}