There is A situation where i have currently used Foreach inside the linq
db.retailer_comm.Where(w => w.optcode == aa.optcode && remlist.Contains(w.userid)).ToList().ForEach(i => i.comm =aa.comm);
The Above Statement is Working Fine, But I want to add two more operation inside the Foreach, like this
db.retailer_comm.Where(w => w.optcode == aa.optcode && remlist.Contains(w.userid)).ToList().ForEach(i => i.comm =aa.comm , i.comm1=aa.comm1);
But It's Give me Error, So How Can i Solve This Problem


Sachin SinghRank #66 · 26.2K reputationPosted Feb 23, 2022, 8:28 AM EST
Guest UserRank #816 · 2.8K reputationPosted Feb 23, 2022, 8:03 AM EST