I was playing around with LINQ today and wondered why code like this won't work: Code Snippet var query = from o in db.Orders select o; foreach( var order in query ) { Console.WriteLine("Order Number: {0}" , order.OrderNumber); foreach( Product in order.Products ) { Console.WriteLine("Product: {0}", product.Name); } } Why doesn't LINQ allow me to navigate related entities like that? It compiles fine but doesn't print the products.
Read More...