I have a List of objects and I want to filter and update the value in a single linq? Is it possible? If not then what is the best way to do it?
PropertyNearBys = PropertyNearbys.Where(x => x.IsActive == true);
PropertyNearbys.ForEach(x => x.PropertyId = PropertyId);
Is there is a possibility of performing above two lines in single LINQ? I want recorded that are active and also want to set PropertyId in single statement