コード例 #1
0
        public async Task <IResultModel> WorkUpdate(EmployeeWorkUpdateModel model)
        {
            var entity = await _workRepository.GetAsync(model.Id);

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

            model.EmployeeId = entity.EmployeeId;//防止人员编号被修改
            _mapper.Map(model, entity);

            var result = await _workRepository.UpdateAsync(entity);

            return(ResultModel.Result(result));
        }
コード例 #2
0
 public Task <IResultModel> WorkUpdate(EmployeeWorkUpdateModel model)
 {
     return(_service.WorkUpdate(model));
 }