Beispiel #1
0
        public async Task <IActionResult> EditPost(int id)
        {
            Publication post = _publication.GetPostDB(id);

            if (post == null)
            {
                return(NotFound());
            }
            EditePostViewModel model = new EditePostViewModel
            {
                Id = post.Id,
                PublicationName = post.PublicationName,
                PublicationText = post.PublicationText,
                Discription     = post.Discription,
                TopicName       = _topic.GetTopicName(post.TopicId)
            };

            return(View(model));
        }
Beispiel #2
0
 public string GetTopicName(int Id)
 {
     return(_topic.GetTopicName(Id));
 }