1 var orders = from o in context.Orders 2 join a in context.Accounts on 3 // 使用匿名類型來構造一個複合的查詢表達式 4 new { Id = o.AccountId, City = o.ShipCity, State = ... ...
1 var orders = from o in context.Orders 2 join a in context.Accounts on 3 // 使用匿名類型來構造一個複合的查詢表達式 4 new { Id = o.AccountId, City = o.ShipCity, State = o.ShipState } 5 equals 6 new { Id = a.AccountId, City = a.City, State = a.State } 7 select o;