Join two lists
-
Friday, September 14, 2012 11:22 AM
Hi i have thee lists sharepoint2010,
but i want to know how can join these list and populate data in gried by linq.
give me easy example so that i can understant easily.
my m unable to write caml query.
pls help asap.
thanks in advance..
All Replies
-
Friday, September 14, 2012 12:28 PMModerator
Hi,
Suppose if you have two list like order and customer and want to retrieve data from both list based on ID then you can use below joins using LINQ
var orderDetails = from order in orders join customer in customersItems on order.CustomerID equals customer.CustomerID select new { customer.ContactName, customer.CompanyName, order.OrderDate, order.ShipCity, };Check this similar thread for more info:
Let us know your have any doubt
Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
- Proposed As Answer by Ed Price - MSFTMicrosoft Employee Wednesday, October 17, 2012 12:54 AM
- Marked As Answer by Hemendra AgrawalMicrosoft Community Contributor, Moderator Monday, December 31, 2012 9:52 AM

