BooksServiceSample.Controllers.BookChaptersController.GetBookChapterById C# (CSharp) 메소드

GetBookChapterById() 개인적인 메소드

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