Exemple #1
0
        public async Task <List <string> > GetTopics()
        {
            var repoTopics = await _repo.GetTopics();

            if (repoTopics == null)
            {
                Console.WriteLine("ForumLogic.GetTopics() was called but there are no topics.");
                return(null);
            }

            var topics = new List <string>();

            foreach (var repoTopic in repoTopics)
            {
                topics.Add(repoTopic.TopicName);
            }
            return(topics);
        }