不用判断循环判断某个字段是否存在

 if (listMDFlowMeter.Exists(e => e.RelatedEquipment == 
GetBLDJobEquipmentByJobIdAndSeqNo(jobId, seqNo))){
                equipment = listMDFlowMeter.Where(e => e.RelatedEquipment == GetBLDJobEquipmentByJobIdAndSeqNo(jobId, seqNo)).FirstOrDefault().Code;
}


 

你可能感兴趣的:(不用判断循环判断某个字段是否存在)