none
求解释linq语句 RRS feed

  • 问题

  • Customer 与 SalesOrderHeader 有主外键关系

    var query1 = db.Customers.Where(c => c.Person.LastName == "Zhou"); var query2 = db.Customers.Where(c => c.Person.LastName == "Zhou").Select(c => c.SalesOrderHeaders); var query3 = db.Customers.Where(c => c.Person.LastName == "Zhou").SelectMany(c => c.SalesOrderHeaders);

    求解释这3句查询出来有何区别?后两者看不懂。


    2013年3月4日 13:19

全部回复