I have this query wit a group join:
foreach (var item in someList)
{
var result = (from t1 in someContext.Table1
join t2 in someContext.Table2 on new { t1.SomeID, item.SomeName} equals new {t2.SomeID, t2.SomeName} into j1
...
}
I would like to know if it is possible to have a group join as above?
new { t1.SomeID, item.SomeName} equals new {t2.SomeID, t2.SomeName}
item.SomeName comes from the list i am iterating through.
If not, how would i change the statement to get the desired results?
The types of the properties used with the equals expression must match. So for example is
Table1.SomeIDisInt32andTable2.SomeIDisNullable<Int32>, then they don’t match.EDIT
Also check item.SomeName is same type as t2.SomeName