public void MarkRenewalAsPaid()
        {
            SubscriptionRenewalPaymentPaidDomainEvent @event =
                new SubscriptionRenewalPaymentPaidDomainEvent(
                    this.Id,
                    this._subscriptionId.Value,
                    SubscriptionRenewalPaymentStatus.Paid.Code);

            this.Apply(@event);
            this.AddDomainEvent(@event);
        }
예제 #2
0
 private async Task When(SubscriptionRenewalPaymentPaidDomainEvent subscriptionRenewalPaymentPaid)
 {
     await _connection.ExecuteScalarAsync(
         "UPDATE payments.SubscriptionPayments SET Status = @Status " +
         "WHERE PaymentId = @SubscriptionRenewalPaymentId",
         new
     {
         subscriptionRenewalPaymentPaid.SubscriptionRenewalPaymentId,
         subscriptionRenewalPaymentPaid.Status
     });
 }
 private void When(SubscriptionRenewalPaymentPaidDomainEvent @event)
 {
     _subscriptionRenewalPaymentStatus = SubscriptionRenewalPaymentStatus.Of(@event.Status);
 }