示例#1
0
        public async Task Handle(CheckoutIntegrationEvent notification, CancellationToken cancellationToken)
        {
            var order = new Orders(notification.TotalPrice, notification.PaymentId, notification.PlayerId);

            notification.Tournaments.ForEach(x => order.AddOrderDetail(Guid.Parse(x.Id)));

            await _paymentRepository.AddOrder(order);

            await _paymentRepository.UnitOfWork.SaveEntitiesAsync();
        }