Update multiple Record In List using linq

Ashif Avatar

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;});

 

 

Leave a Reply

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