Ejemplo n.º 1
0
        public IActionResult DetailsOfCurrentUser()
        {
            //collects all question that the user asked
            ViewBag.Questions = _datahandler.AllQuestionForUser(_datahandler.GetUserId(User.Identity.Name));

            //collects all answer that the user wrote
            ViewBag.Answers = _datahandler.AnswersWithQuestions(_datahandler.GetUserId(User.Identity.Name));

            //collects all comments that the user wrote
            ViewBag.Comments = _datahandler.CommentsWithQuestions(_datahandler.GetUserId(User.Identity.Name));

            return(View());
        }