I am new to Linq.
I want to set two values in foreach statement like this
foreach
My actual code is this
foreach (Employee emp in employees
employees.ToList().ForEach( emp=> { collection.AddRange(emp.Departments); emp.Departments.ToList().ForEach(u=>u.SomeProperty = null); });