PivotalPoker.Controllers.StoryController.Detail C# (CSharp) Method

Detail() public method

public Detail ( int projectId, int storyId ) : System.Web.Mvc.ActionResult
projectId int
storyId int
return System.Web.Mvc.ActionResult
        public ActionResult Detail(int projectId, int storyId)
        {
            if (string.IsNullOrEmpty(CurrentUserName))
                return RedirectToAction("Index", "Home");

            var game = _games.Get(projectId, storyId);
            EnsurePlayerExists(game, CurrentUserName);

            var project = _pivotal.GetProject(projectId);
            var pointScaleOptions = project.PointScale.Split(',').Select(n => int.Parse(n));
            var story = _pivotal.GetStory(projectId, storyId);
            _pivotal.LoadTasks(story);
            _pivotal.LoadNotes(story);
            var model = new DetailModel
            {
                Story = story,
                PointScaleOptions = pointScaleOptions
            };

            return View(model);
        }