BookServiceAsyncSample.Controllers.BookChaptersController.GetBookChapterByIdAsync C# (CSharp) Method

GetBookChapterByIdAsync() private method

private GetBookChapterByIdAsync ( System.Guid id ) : Task
id System.Guid
return Task
        public async Task<IActionResult> GetBookChapterByIdAsync(Guid id)
        {
            BookChapter chapter = await _repository.FindAsync(id);
            if (chapter == null)
            {
                return NotFound();
            }
            else
            {
                return new ObjectResult(chapter);
            }
        }