/// <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;
     }
 }
示例#2
0
 public bool Update(Disaster entity)
 {
     _disasterRepository.Update(entity);
     return(true);
 }