示例#1
0
        public async Task <IResultModel> Update(SkinUpdateModel model)
        {
            var entity = await _repository.FirstAsync(model.Id);

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

            _mapper.Map(model, entity);

            var result = await _repository.UpdateAsync(entity);

            return(ResultModel.Result(result));
        }
示例#2
0
 public Task <IResultModel> Update(SkinUpdateModel model)
 {
     return(_service.Update(model));
 }