public async Task Handle(CaseInstanceWorkerTaskRemovedEvent message, CancellationToken token) { var record = await _casePlanInstanceQueryRepository.Get(message.AggregateId, token); record.Handle(message); await _casePlanInstanceCommandRepository.Update(record, token); await _casePlanInstanceCommandRepository.SaveChanges(token); }
public async Task Handle(CaseInstanceWorkerTaskRemovedEvent message, CancellationToken token) { var id = CaseWorkerTaskAggregate.BuildCaseWorkerTaskIdentifier(message.AggregateId, message.CasePlanInstanceElementId); var result = await _caseWorkerTaskQueryRepository.Get(id, token); await _caseWorkerTaskCommandRepository.Delete(result, token); await _caseWorkerTaskCommandRepository.SaveChanges(token); }