Пример #1
0
        public ForumTopicDTO GetById(int id)
        {
            var topic = _forumTopicRepository.Find(id: id);

            if (topic == null)
            {
                return(null);
            }
            return(_forumTopicFactory.Create(forumTopic: topic));
        }
Пример #2
0
        public bool ForumTopicIdCheck(int id, IForumTopicRepository forumTopicRepository)
        {
            var person = forumTopicRepository.Find(id: id);

            if (person != null)
            {
                return(true);
            }
            LastErrorMessage = "ForumTopic not found";
            return(false);
        }