I've been banging my head on this one for about 2 days now.
I have a really advanced SQL Server query that I need translated to LINQ.
It involves:
- 6 inner joins
- A select that includes columns from each of the tables
- A specific groupby that involves a ton of columns from each table.
I also need to be able to dynamically build a where clause predicate (using predicatebuilder), so if I want the where clause applied in the correct spot, I think I need to use lambda expressions (after much trial and error).
Here is the part that I'm having a very difficult time translating:
var query = from order in orders
join customer in customers on order.CustomerID equals customer.ID
join ordersection in ordersections on order.ID equals ordersection.OrderID
join ticket in tickets on ordersection.ID equals ticket.OrderSectionID
join evt in events on ticket.EventID equals evt.id
join client in clients on evt.ClientID equals client.id
join venue in venues on evt.VenueID equals venue.VenueID
Thanks so much for your time (in advance)!
Joinsworking, or you want solution for this too