public async Task <dynamic> GetCategory(string categoryId) { string userId = Request.Query .SingleOrDefault(q => string.Compare(q.Key, "userId", StringComparison.OrdinalIgnoreCase) == 0) .Value; try { return(await _crudService.GetCategoryAsync(userId, categoryId)); } catch (Exception e) { _logger.LogError("Get Category Failed " + e); return(BadRequest(e.Message)); } }