Update multiple Record In List using linq

Sometime it requires to update multiple records in List using linq, previous process was for loop, but using below example using linq , update can be done for list

 plod.objProduct.Where(i=>i.SID==sid).ToList().ForEach(u=>{u.ShipCharg=shpchrg;u.ShipType=shptype;});

 

 

CATEGORIES:

Tags:

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *