Skip to content

Instantly share code, notes, and snippets.

@mesutd0nmez
Created July 17, 2018 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mesutd0nmez/91d8e4f85d536b5c3d001280b356b486 to your computer and use it in GitHub Desktop.
Save mesutd0nmez/91d8e4f85d536b5c3d001280b356b486 to your computer and use it in GitHub Desktop.
var list = dc.Orders.
Join(dc.Order_Details,
o => o.OrderID, od => od.OrderID,
(o, od) => new
{
OrderID = o.OrderID,
OrderDate = o.OrderDate,
ShipName = o.ShipName,
Quantity = od.Quantity,
UnitPrice = od.UnitPrice,
ProductID = od.ProductID
}).Join(dc.Products,
a => a.ProductID, p => p.ProductID,
(a, p) => new
{
OrderID = a.OrderID,
OrderDate = a.OrderDate,
ShipName = a.ShipName,
Quantity = a.Quantity,
UnitPrice = a.UnitPrice,
ProductName = p.ProductName
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment