예제 #1
0
        public async Task <ActionResult <CategoryDetailDto> > GetCategoryDetail(int id)
        {
            var category = await _context.Categories.FindAsync(id);

            if (category == null)
            {
                return(NotFound());
            }

            return(DtoConverter.ConvertToCategoryDetailDto(category));
        }