public async Task <bool> UpdateDicDataAsync(DicDataViewModel model)
        {
            var entity = _mapper.Map <DicData>(model);

            _dicdataRepository.Update(entity);
            await _unitOfWork.SaveAsync();

            return(true);
        }
        public async Task <bool> AddDicDataAsync(DicDataViewModel model)
        {
            var dicdata = _mapper.Map <DicData>(model);
            await _dicdataRepository.AddAsync(dicdata);

            await _unitOfWork.SaveAsync();

            return(true);
        }
        public async Task <IActionResult> Update(DicDataViewModel dicdataViewModel)
        {
            var isSuccess = await _dicDataService.UpdateDicDataAsync(dicdataViewModel);

            if (!isSuccess)
            {
                return(this.BadRequestResult("更新失败!"));
            }
            return(Ok());
        }
        public async Task <bool> UpdateDicDataAsync(DicDataViewModel model)
        {
            try
            {
                var entity = _mapper.Map <DicData>(model);
                _dicdataRepository.Update(entity);
                await _unitOfWork.SaveAsync();

                return(true);
            }
            catch (Exception e)
            {
                _logger.LogError(e.Message);
                _logger.LogError(e.StackTrace);
                return(false);
            }
        }