Example #1
0
        public async Task <CategoryDto> GetAsync(long id)
        {
            var category = await _categoryRepo.GetCategoryAsync(id) ?? throw new KnownException("分类信息不存在或已删除!", ServiceResultCode.NotFound);

            return(_mapper.Map <CategoryDto>(category));
        }