I am having trouble on how to convert this to Linq. Any help will be greatly appreciated.
foreach (var stat in stats)
foreach (var record in worked)
if (stat.Name != record.Name) continue;
stat.WorkedToday = record.RecordCount;
Please find an answer in .NET FIDDLE I hope this will help
//be careful method 'First' can throw an exception if there is no such element in sequence stats .ForEach(s => s.WorkedToday = worked.First(w => w.Name == s.Name).RecordCount); }