Biljana Biljana - 1 year ago 71
SQL Question

How to convert SQL Query to Lambda Expression

Here is my SQL Query:

FROM aspnet_Users u
INNER JOIN aspnet_Membership m
ON u.UserId = m.UserId

Can anybody help me how to write with lambda expression?

Answer Source

Try this..

from u in context.aspnet_Users 
join m in context.aspnet_Membership on u.UserId equals m.UserId select new { u.UserName, m.IsApproved};