Exemplo n.º 1
0
        public async Task <IActionResult> GetBookChapterByIdAsync(Guid id)
        {
            BookChapter chapter = await _repository.FindAsync(id);

            if (chapter == null)
            {
                return(NotFound());
            }
            else
            {
                return(new ObjectResult(chapter));
            }
        }
        public async Task <IActionResult> GetBookChapterByIdAsync(Guid id)
        {
            string message = string.Format($"Id={id.ToString()}");

            _logger.LogInformation(message);
            BookChapter chapter = await _repository.FindAsync(id);

            if (chapter == null)
            {
                return(NotFound());
            }
            else
            {
                return(new ObjectResult(chapter));
            }
        }