Beispiel #1
0
        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();
        }
Beispiel #2
0
 private void Apply(IncentiveUpdated e)
 {
     this.IncentiveAmount = e.IncentiveAmount;
 }