Beispiel #1
0
        public IActionResult EditMessage(int id)
        {
            var msg = _msgRepo.GetMessage(id);
            TopicAndMsgsViewModel tmvm = new TopicAndMsgsViewModel();

            tmvm.Message = msg;
            return(View(tmvm));
        }
Beispiel #2
0
        public IActionResult ShowTopic(int id)
        {
            var topic = _topicRepo.GetTopic(id);
            List <ForumMessage>   msgs = _msgRepo.GetMessages(id);
            TopicAndMsgsViewModel tmvm = new TopicAndMsgsViewModel();

            tmvm.Topic    = topic;
            tmvm.Messages = msgs;
            tmvm.context  = HttpContext;
            return(View(tmvm));
        }