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?
In this case you must be sure that the properties and type of the two new anonymous objects are the same. I usually give specific name of properties.
Ex.:
 var result = from t1 in someContext.Table1
              join t2 in someContext.Table2 on 
                          new { SomeID = t1.SomeID, SomeName = someName} equals 
                          new { SomeID = t2.SomeID, SomeName = t2.SomeName} into j1 
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With