Thursday, January 25, 2024

if condition inside foreach loop lamda expression ASP.NET C# - if condition linq

actSectionDetailsList.ForEach(t => { if (t.ActSectionDetailsId > 0) { t.UpdatedBy = CurrentUser.UserId; t.UpdatedIPAddress = CurrentUser.IpAddress; } });



 https://stackoverflow.com/questions/1816859/using-conditional-operator-in-lambda-expression-in-foreach-on-a-generic-list

No comments:

Post a Comment