2009-07-31 71 views

回答

12

與此類似,使用object initializer syntax

var customers = from c in Customers 
    where c.Orders.Count > 15 
    orderby c.Orders.Count ascending 
    select new 
    { 
     Name = c.ContactName, 
     c.City, 
     NumberOfOrders = c.Orders.Count 
    }; 
+0

@CMS你認爲這是他想要的嗎? +1來回答他所問的問題。 – 2009-07-31 15:00:08

相關問題