Beispiel #1
0
        public BacklogEvalQueryResult HandleBacklogCreationRequest(BacklogCreationRequest request)
        {
            var backlog = new Backlog
            {
                Title       = request.Title,
                UserStories = request.UserStories
            };

            string backlogid = _backlogrepo.CreateBacklog(backlog);

            return(EvalSubmissions(backlogid));
        }
        public (Status, BacklogEvalQueryResult) HandleBacklogCreationRequest(BacklogCreationRequest request)
        {
            var backlog = new Backlog
            {
                Title          = request.Title,
                UserStories    = request.UserStories,
                OneVotePerUser = request.OneVotePerUser
            };

            var(status, backlogId) = _backlogrepo.CreateBacklog(backlog);
            if (status is Failure)
            {
                return(status, null);
            }

            status = _userRepo.AddUserBacklogId(request.UserId, backlogId);
            if (status is Failure)
            {
                return(status, null);
            }

            return(EvalSubmissions(backlogId));
        }