public EventStream CreateUserQuestionAnswerEventStream(BeginPersonalityTest command) { var eventStream = _session.Events.StartStream <UserQuestionAnswer>(command.Identifier); _session.SaveChanges(); return(eventStream); }
public async Task <IActionResult> BeginTest([FromBody] BeginPersonalityTest command) => (await Mediator.Send(command) .MapAsync(ToResourceAsync <UserAnswersStreamView, UserAnswersStreamResource>)) .Match(Ok, Error);