async Task INotificationHandler <IncentiveUpdated> .Handle(IncentiveUpdated e, CancellationToken cancellationToken) { var incentive = await db.Incentives .SingleAsync(t => t.InternalId == e.Id); incentive.IncentiveAmount = e.IncentiveAmount; incentive.UpdateAt = DateTimeOffset.Now; await db.SaveChangesAsync(); }
private void Apply(IncentiveUpdated e) { this.IncentiveAmount = e.IncentiveAmount; }