Hi,
I want to be able to perform a LINQ query that returns all contacts on a marketing list, I have the following query, but I get the error message 'The type of one of the expressions in the join clause is incorrect. Type inference failed in the call
to 'Join'.
Which is referring to the join between c.ContactId which is a Guid and l.EntityId which is an EntyReference.
Can anybody help me resolve this?
var contacts = (from c in orgContext.ContactSet
join l in orgContext.ListMemberSet on c.ContactId equals l.EntityId
where (c.EMailAddress1 == "" && c.EMailAddress2 != "")
&& l.ListMemberId = listid
select new Contact
{
ContactId = c.ContactId,
EMailAddress1 = c.EMailAddress1,
EMailAddress2 = c.EMailAddress2
});
Thanks in advance,
Phil