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(); }
private void Apply(IncentiveTypeUpdated e) { this.CommonName = e.CommonName; this.CostCodeId = e.CostCodeId; this.IsActive = e.IsActive; }