コード例 #1
0
        public async Task <ActionResult> AllCategories()
        {
            var categories = await _service.AllCategoriesAsync();

            if (!categories.Any())
            {
                return(NoContent());
            }

            return(Ok(Map <IEnumerable <CategoryModel> >(categories)));
        }