using System.Collections.Generic;
public int UserId { get; set; }
public List<Bar> Bars { get; set; }
public string SomeProperty { get; set; }
public string SomePropertyINeedToUpdate { get; set; }
public static void Main()
from p in Program.OldData()
foreach (var item in stuff)
Console.WriteLine(item.UserId);
from p in Program.OldData().SelectMany(sm => sm.Bars)
SomeProperty = p.SomeProperty
foreach (var item in otherStuff)
Console.WriteLine(item.SomeProperty);
public static List<Foo> OldData()
SomePropertyINeedToUpdate = "Going To Update"
SomeProperty = "Other Test",
SomePropertyINeedToUpdate = "No need to update"
SomeProperty = "blah Test",
SomePropertyINeedToUpdate = "Going To Update"
SomeProperty = "blah Other Test",
SomePropertyINeedToUpdate = "No need to update"
public static List<Foo> NewData()
SomePropertyINeedToUpdate = "Blah Updated"
SomeProperty = "jaosidfj Test",
SomePropertyINeedToUpdate = "No need to update"
SomePropertyINeedToUpdate = "Updated"
SomeProperty = "asodifj",
SomePropertyINeedToUpdate = "No need to update"