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
you want this?
employees.ForEach(emp => { collection.AddRange(emp.Departments.Where(dept => { dept.SomeProperty = null; return true; })); });