public void Handle(DeactivateInventoryItem message) { var item = _session.Get <InventoryItem>(message.Id, message.ExpectedVersion); item.Deactivate(); _session.Commit(); }
public async Task Handle(DeactivateInventoryItem message) { var item = await _repository.GetById(message.InventoryItemId); item.Deactivate(); await _repository.Save(item); }
public async Task HandleAsync(DeactivateInventoryItem message) { var item = await this.repository.GetByIdAsync(message.Id); item.Deactivate(); await this.repository.SaveAsync(item, message.OriginalVersion); }
// 注销事件处理 public void Handle(DeactivateInventoryItem message) { var item = _repository.GetById(message.InventoryItemId); item.Deactivate(); _repository.Save(item, message.OriginalVersion); }
public async Task Handle(DeactivateInventoryItem message) { var item = await _session.Get <InventoryItem>(message.Id, message.ExpectedVersion); item.Deactivate(); await _session.Commit(); }
public void Handle(DeactivateInventoryItem message) { var item = _repository.Get(message.AggregateId); item.Deactivate(); _repository.Save(item, message.ExpectedVersion); }
public void Handle(DeactivateInventoryItem message) { var item = _repository.GetById(message.AggregateId, message.Version); item.Deactivate(); _repository.Save(item); }
public ActionResult Deactivate(Guid id, int version) { var command = new DeactivateInventoryItem(id, version); _bus.Send(command); return(RedirectToAction("Index")); }
public async Task Handle(DeactivateInventoryItem message) { var item = Repository.GetById(message.InventoryItemId); item.Deactivate(); Repository.Save(item, message.OriginalVersion); }
public IEnumerable <Event> Handle(DeactivateInventoryItem cmd) { CheckIsActive(); yield return(new InventoryItemDeactivated()); }
public async Task Handle(DeactivateInventoryItem command) { await _HandleUpdate(command); }
public IEnumerable<Event> Handle(DeactivateInventoryItem cmd) { CheckIsActive(); yield return new InventoryItemDeactivated(); }
public void Delete(Guid id, int version) { var command = new DeactivateInventoryItem(id, version); _bus.Send(command); }
public void Handle(DeactivateInventoryItem message) { var item = _repository.GetById(message.InventoryItemId); item.Deactivate(); _repository.Save(item, message.OriginalVersion); }