public async Task <IResultModel> Update(JobClassUpdateModel model) { var entity = await _repository.GetAsync(model.Id); if (entity == null) { return(ResultModel.NotExists); } _mapper.Map(model, entity); //if (await _repository.Exists(entity)) //{ //return ResultModel.HasExists; //} var result = await _repository.UpdateAsync(entity); return(ResultModel.Result(result)); }
public Task <IResultModel> Update(JobClassUpdateModel model) { return(_service.Update(model)); }