Exemplo n.º 1
0
 public Task Handle(UseRatePaymentFee evt, CancellationToken cancellationToken)
 {
     return(Update(CreditCardSubscriptionModelProjection.Id, model =>
     {
         var subscription = model.Subscriptions.SingleOrDefault(x => x.Id == (Guid)evt.AggregateId);
         if (subscription != null)
         {
             subscription.Fee = $"Rate fee of {evt.FeeRate}%";
         }
     }));
 }
Exemplo n.º 2
0
 public void Apply(UseRatePaymentFee evt)
 {
     _paymentFeeStrategy = new RateFeeStrategy(evt.FeeRate);
 }