There was a library of dynamic LINQ extensions methods released as a sample with Visual Studio 2008. I\'d like to extend it with a join method. The code below fail
You can install the nuget package of System.Linq.Dynamic.Core - https://github.com/StefH/System.Linq.Dynamic.Core
This has the join method implemented along with various other helper methods.
Using this library you can do a simple join in the following the way
myContext.TableA.Join(myContext.TableB,'Id','TableAId','outer',null)
in the result selector outer and inner are key words to access the result of the join.
Using a key with multiple properties and/or selecting a result with multiple properties can be done in the following way
myContext.TableA.Join(myContext.TableB,'new (Id as key1,Code as key2)','new (TableAId as key1,AnotherCol as key2)','new(outer.Id,inner.Desc)',null)