I want to join 2 tables and get some data out of it using LINQ. here are the 2 ways in which i can do this
1.
var orders = from order in db.Order
from user in db.User
where order.UserId == user.UserId
select order;
2.
var result = from order in db.Order
join user in db.user
on order.UserId equals user.userId
select order
are these queries one and the same? are they different in any way?
Both are same. First syntax is implicit, second one is explicit join syntax.
Refer to wikipedia link for both type of syntax.