public async Task Handle(UpdateActionItem command) { var retrospective = await _store.GetById <Retrospective>(command.RetrospectiveId); retrospective.UpdateActionItem(command.ActionItemId, command.Description, command.ParticipantId); await _store.Save(retrospective, retrospective.Version); }
public async Task <IActionResult> UpdateActionItem(Guid retrospectiveId, Guid actionItemId, string participantId, [FromBody] string description) { var retro = await _aggRepo.GetById <Retrospective>(retrospectiveId); var cmd = new UpdateActionItem(retrospectiveId, actionItemId, description, participantId); await _cmdSender.Send(cmd); var response = RedirectToAction("Get", new { retrospectiveId = retrospectiveId }); return(response); }