async Task INotificationHandler <IncentiveTypeUpdated> .Handle(IncentiveTypeUpdated e, CancellationToken cancellationToken)
        {
            var incentiveType =
                await db.IncentiveTypes
                .SingleAsync(t => t.InternalId == e.Id);

            incentiveType.CommonName = e.CommonName;
            incentiveType.IsActive   = e.IsActive;

            await db.SaveChangesAsync();
        }
Beispiel #2
0
 private void Apply(IncentiveTypeUpdated e)
 {
     this.CommonName = e.CommonName;
     this.CostCodeId = e.CostCodeId;
     this.IsActive   = e.IsActive;
 }