public IActionResult UpVote([FromRoute(Name = "id")] int id) { QuestionModel question = Idao.GetQuestionById(id); question.VoteUp(); Idao.UpdateVoteNumber(question.Id, question.Vote, "question"); UserModel user = Idao.GetUserById(question.User_Id); user.IncreaseReputation(5); Idao.UpdateUser(user); return(View("Question", question)); }
public IActionResult User(int id) { return(View("UserPage", Idao.GetUserById(id))); }