After quick overview I didn’t find how to deal with linq to sql if I have several nested inner joins.
That’s what I’d like to have in linq
SELECT Booking.BookingId, Booking.EventId, Booking.StartDate, Event.Name, Person.FirstName
FROM Booking
INNER JOIN Event
INNER JOIN Asset
ON Asset.AssetId = Event.AssetId
INNER JOIN Person
ON Person.PersonId = Event.ContactPersonId
ON Event.EventId = Booking.EventId AND Event.State = 4
Does anyone know how to translate it to LINQ?
Thanks.
you can replace a,b,c,d at then with the column names you want
another way is to use the join keyword: