list.ForEach的用法

Templist.ForEach(o =>
{
   var isSel = ReviewerFileRelationService.Where(s => s.PackageFileId == o.Id && s.ReviewerId == o.ContactId).AsQueryable().FirstOrDefault();
   if (isSel != null)
   {
       o.Contact = "" + o.Id + "_" + o.ContactId + "\" /> ";
   }
   else
   {
       o.Contact = "" + o.Id + "_" + o.ContactId + "\" /> ";
   }
});

 

转载于:https://www.cnblogs.com/shinima/p/4381015.html

你可能感兴趣的:(list.ForEach的用法)