Exemple #1
0
        async Task INotificationHandler <IncentiveCanceled> .Handle(IncentiveCanceled e, CancellationToken cancellationToken)
        {
            var incentive =
                await db.Incentives
                .SingleAsync(t => t.InternalId == e.Id);

            incentive.IsCanceled = true;
            incentive.CancelAt   = e.TimeStamp;

            await db.SaveChangesAsync();
        }
Exemple #2
0
 private void Apply(IncentiveCanceled e)
 {
     this.IsCanceled = true;
 }