public async Task <IResultModel> Update(DictionaryGroupUpdateModel model)
        {
            var entity = await _repository.FirstAsync(model.Id);

            if (entity == null)
            {
                return(ResultModel.NotExists);
            }

            if (await _repository.ExistsAsync(m => m.Code == model.Code && m.Id != entity.Id && m.IsDel == false))
            {
                return(ResultModel.HasExists);
            }

            _mapper.Map(model, entity);

            var result = await _repository.UpdateAsync(entity);

            return(ResultModel.Result(result));
        }
 public Task <IResultModel> Update(DictionaryGroupUpdateModel model)
 {
     return(_service.Update(model));
 }