/// <summary> /// 修改数据 /// </summary> /// <param name="disasterDto"></param> /// <returns></returns> public async Task <DisasterDto> Update(DisasterInput input) { try { DisasterEntity disasterEntity = new DisasterEntity { Id = input.Id, DISASTERNAME = input.DISASTERNAME, OCCURTIME = input.OCCURTIME, POSITION = input.POSITION, REMARK = input.REMARK, AREARIGHTCODE = input.AREARIGHTCODE, IsDeleted = false }; DisasterEntity entity = _iDisasterRepository.Update(disasterEntity); DisasterDto disasterDtoRtn = entity.MapTo <DisasterDto>(); return(disasterDtoRtn); } catch (Exception exception) { throw exception; } }
public bool Update(Disaster entity) { _disasterRepository.Update(entity); return(true); }