public async Task AppendAsync(IEnumerable <IDomainEvent <TId> > domainEvents, CancellationToken cancellationToken = default)
        {
            if (!domainEvents.Any())
            {
                return;
            }

            var query =
                $@"INSERT INTO {EventStoreTableName} ({EventStoreListOfColumnsInsert})
                    VALUES (@Id,@CreatedAt,@Version,@Name,@AggregateId,@Data);";

            var listOfEvents = domainEvents.OrderBy(x => x.Version).Select(ev => new
            {
                CreatedAt = ev.TimeStamp,
                Data      = JsonConvert.SerializeObject(ev, Formatting.Indented, _jsonSerializerSettings),
                Id        = ev.EventId,
                ev.GetType().Name,
                AggregateId = ev.AggregateId.ToString(),
                ev.Version,
            });

            await using var connection = _connectionFactory.SqlConnection();
            await connection.ExecuteAsync(query, listOfEvents);
        }