Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Change SQL to Linq/ Lambda expression

$
0
0

Hi, I would like to join two tables in the MVC controller. How do i change the below SQL codes into a linq or lambda expression? I would like to get all the data column from User as Event and booking have a relationship but user and event does not have a relationship. Thank you very much for your help.

SELECT e*
FROM Event e, Booking b, User u
WHERE e.id = b.event_id
AND b.id = u.booking_id


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>