BooksServiceSample.Controllers.BookChaptersController.GetBookChapterById C# (CSharp) Method

GetBookChapterById() private method

private GetBookChapterById ( string id ) : IActionResult
id string
return IActionResult
        public IActionResult GetBookChapterById(string id)
        {
            BookChapter chapter = _repository.Find(id);
            if (chapter == null)
            {
                return NotFound();
            }
            else
            {
                return new ObjectResult(chapter);
            }
        }