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(); }
private void Apply(IncentiveCanceled e) { this.IsCanceled = true; }