I try to join a navigation property by using LINQ. This is my code
var activities = Using<GetActivitiesForUser>()
.Execute(User.DisplayAs, User.MarketId);
var contacts = Using<GetContactsForUser>()
.Execute(User.DisplayAs, User.MarketId);
var model = from activity in activities
join contact in contacts
on activity.ContactId equals contact.ContactId
select activity;
This code will only select the activity without any join. The activity has a property named Contact, and i want to join that property from Contacts.
UPDATE
Example to solve it
foreach(var activity in activities)
{
activity = from contact in contacts
where contact.ContactId=activity.ContactId
select contact
}
But i want to do this with a join.
Using
method? – Gert Arnold Mar 23 '13 at 23:58