This question already has an answer here:
Iam using the Entity Framework. How would i write the following Linq-Code in Lambda C#?
var users = (from u in context.Users.ToList()
from e in u.Events
where e.EventName == eventName //Name of the Event, the user is related to
select u.FirstName + u.LastName).ToList();
Can't get through Lambda in this situation.
Update, adding test related classes;
and code;
The equivalent in "Method Chains" (that's what it's called) looks like this:
Please note that I omitted the call to
ToList()
oncontext.Users
because it seems unnecessary.