用where进行条件查询

newDP.DisasterType = types.Where(t => t.Type == newDP.DisasterType).First().Code;

原文地址:https://www.cnblogs.com/xlyg-14/p/4642065.html