public static BsonDocument ToBson(EventHandlerRecord record)
{
return new BsonDocument
{
{ "HandlerId", record.HandlerId ?? "" },
{ "EventId", record.EventId ?? "" },
{ "CommandId", record.CommandId ?? "" },
{ "TypeName", record.TypeName ?? "" },
{ "StartedDate", record.StartedDate },
{ "EndedDate", record.EndedDate },
{ "ErrorMessage", record.ErrorMessage ?? "" },
{ "ErrorStackTrace", record.ErrorStackTrace ?? "" },
};
}