コード例 #1
0
        public ActionResult ChangePointComment(int problemId, string point, int commentId)
        {
            switch (point)
            {
            case "+":
                _commentRepo.ChangePoint(commentId, 1);
                break;

            case "-":
                _commentRepo.ChangePoint(commentId, 0);
                break;

            default:
                return(RedirectToAction("Detail", new { id = problemId }));
            }

            return(RedirectToAction("Detail", new { id = problemId }));
        }