Ejemplo n.º 1
0
        public ActionResult PostCreate(CreateBacklogViewModel model)
        {
            var request = Mapper.Map <BacklogCreationRequest>(model);

            var result = _handler.HandleBacklogCreationRequest(request);

            var evalModel = Mapper.Map <BacklogEvalQueryResult>(result);

            return(RedirectToAction(nameof(Eval), new { evalModel.Id }));
        }
Ejemplo n.º 2
0
        public ActionResult PostCreate(CreateBacklogViewModel model)
        {
            var request = Mapper.Map <BacklogCreationRequest>(model);

            request.UserId = User.GetId();

            var(status, evalResult) = _handler.HandleBacklogCreationRequest(request);

            if (status is Failure f)
            {
                TempData[TempDataKeys.ErrorMessageString] = f.ErrorMessage;
                return(View("Error"));
            }

            return(RedirectToAction(nameof(Index)));
        }
Ejemplo n.º 3
0
        public ActionResult GetCreate()
        {
            var viewModel = new CreateBacklogViewModel();

            return(View("Create", viewModel));
        }