Exemplo n.º 1
0
        public async Task <IResponseOutput> UpdateAsync(DictionaryUpdateInput input)
        {
            if (!(input?.Id > 0))
            {
                return(ResponseOutput.NotOk());
            }

            var entity = await _dictionaryRepository.GetAsync(input.Id);

            if (!(entity?.Id > 0))
            {
                return(ResponseOutput.NotOk("Êý¾Ý×ֵ䲻´æÔÚ£¡"));
            }

            _mapper.Map(input, entity);
            await _dictionaryRepository.UpdateAsync(entity);

            return(ResponseOutput.Ok());
        }
Exemplo n.º 2
0
 public async Task <IResponseOutput> Update(DictionaryUpdateInput input)
 {
     return(await _dictionaryServices.UpdateAsync(input));
 }