XElement xmlCustomers = XElement.Load("customersWithOrdersDataSource.xml");

var customersWithOrders =
from c in xmlCustomers.Elements("customer")
select new Customer {
Name = (String)c.Attribute("name"),
City = (String)c.Attribute("city"),
Country = (Countries)Enum.Parse(typeof(Countries),
	(String)c.Attribute("country"), true),
Orders = (
from o in c.Descendants("order")
select new Order {
IdOrder = (Int32)o.Attribute("id"),
IdProduct = (Int32)o.Attribute("idProduct"),
Quantity = (Int32)o.Attribute("quantity"),
Month = (String)o.Attribute("month"),
Shipped = (Boolean)o.Attribute("shipped"),
}
).ToArray()
};

foreach (Customer c in customersWithOrders) {
Console.WriteLine(c);
foreach (Order o in c.Orders) {
	Console.WriteLine(" {0}", o);
	}
}
