public async Task <AssetCategoryDto> UpdateAssetCategoryAsync(UpdateAssetCategoryInput input)
        {
            AssetCategory entity = await repository.GetAsync(input.Id ?? 1);

            ObjectMapper.Map(input, entity);
            entity = await repository.UpdateAsync(entity);

            await CurrentUnitOfWork.SaveChangesAsync();

            return(ObjectMapper.Map <AssetCategoryDto>(entity));
        }
Esempio n. 2
0
 public async Task <AssetCategoryDto> UpdateAssetCategory([FromBody] UpdateAssetCategoryInput input)
 {
     return(await assetCategoryAppService.UpdateAssetCategoryAsync(input));
 }