public async Task <IResultModel> Update(ModulesUpdateModel 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)); }
public Task <IResultModel> Update(ModulesUpdateModel model) { return(_service.Update(model)); }