async Task INotificationHandler <CostCodeUpdated> .Handle(CostCodeUpdated e, CancellationToken t) { var result = await db.CostCodes .SingleAsync(u => u.CostCodeExternalId == e.Id); result.CommonName = e.CommonName; result.UniqueIdentifier = e.UniqueIdentifier; await db.SaveChangesAsync(); }
private void Apply(CostCodeUpdated e) { this.CommonName = e.CommonName; this.UniqueIdentifier = e.UniqueIdentifier; this.IsActive = e.IsActive; }