query and create objects with a one to many relationship using LINQ
问题 In the DB, I have a two tables with a one-to-many relationship: orders suborders ----------- ----------- id id name order_id name I'd like to query these tables and end up with a list of order objects, each of which contains a list (or empty list) of suborder objects. I'd also like to do this in a single DB query so it performs well. In traditional SQL query land, I'd do something like (forgive the pseudocode): rs = "select o.id, o.name, so.id, so.name from orders o left join suborders so on