Shared code: I go this error when I use it with select with another class 'Unable to create a null constant value of type 'TestProject.Contollers.TableViewModel'. Why does Jesus turn to the Father to forgive in Luke 23:34? So in the current .NET version, order is guaranteed, but since MS unfortunately hasn't documented this, they could change it in later versions. I filter both sets so that some records are unique to each set and some exist on both sets. One of the ways how to solve this problem is in the code below: If real collections are large for HashSet formation instead foreach loops can be used the code below: Thank You everybody for the interesting posts! Thanks for contributing an answer to Stack Overflow! And this is the more complicated way using lambda expressions to write it: I would recommend switching to from syntax and you can use the into keyword. These methods perform equijoins, or joins that match two data sources based on equality of their keys. How to do joins in LINQ on multiple fields in single join, LINQ's Distinct() on a particular property, How do you perform a left outer join using linq extension methods, Using LINQ to remove elements from a List
full join linq lambda