public async Task <GetUnitOfMeasureDto> UpdateUnitOfMeasureAsync(int id, EditUnitOfMeasureDto unitOfMeasureDto)
        {
            var unitOfMeasure = await GetUnitOfMeasureId(id);

            await CheckUnitOfMeasureAsync(id, unitOfMeasureDto.Code);

            unitOfMeasure = _mapper.Map(unitOfMeasureDto, unitOfMeasure);

            await _unitOfMeasure.UpdateUnitOfMeasureAsync(unitOfMeasure);

            return(_mapper.Map <GetUnitOfMeasureDto>(unitOfMeasure));
        }