I am trying to get the first order that has been placed by each customer based on a Timestamp.
Below is some pseudo code, that doesn’t compile :
var minOrders = (from Orders in DataSet.Orders select Orders.OrderTimestamp).Min()
join Customers in DataSet.Customers on Orders.CustomerId equals Customers.CustomerId
select new
{
Customers.Name,
Orders.OrderAmount
});
Any pointers as to the correct LINQ structure would be great, Thanks.
Joe
Based on the code you have written i supose you need the first order of each costumor
Your statement would be then