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

 

 

You Might Also Like

Leave a Reply