예제 #1
0
        public async Task <IActionResult> AddTopic(ForumTopic topic)
        {
            await _forumRepository.AddTopic(topic);

            if (await _forumRepository.SaveChanges() == true)
            {
                return(new OkObjectResult(topic));
            }
            return(new BadRequestObjectResult(topic));
        }