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