Пример #1
0
        public async Task <IActionResult> GetAssetCategory(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(BadRequest());
            }

            var res = await _assetsService.AssetCategoryGetAsync(id);

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

            return(Ok(GetAssetCategoriesResponseModel.Create(new[] { res.ConvertToApiModel() })));
        }
Пример #2
0
 public Task <AssetCategory> GetAssetCategoryAsync(string categoryId)
 {
     return(_assetsService.AssetCategoryGetAsync(categoryId));
 }