I have 2 lists in my c# code code.
The first list has following structure
List<ObjectA>
Where ObjectA is class of following structure
public class ObjectA
{
public string ID { get; set; }
public string EId1 { get; set; }
public string EId2 { get; set; }
public string EId3 { get; set; }
public string EId4 { get; set; }
}
The second list has following structure
List<ObjectB>
where ObjectB is class of following structure
public class objectB
{
public string ID{get;set;}
public string Name{get;set;}
}
I can do a join on a single column using the following query
var finalList= from objA in objectAList
join objB in objectBList
on objA.EId1 equals objB.ID
select new
{
Id = objA.ID,
EId = objB.Id,
Name = objB.Name
};
This works fine. However i need to check if the Id from the second list matches any of the 4 columns(Eid1, Eid2, Eid3 , Eid4) from the first list . How do i do that?