I would like to know if this is possible to solve using a lambda expression:
List listOne = service.GetListOne();
List listTwo = service.Ge
var result = from one in listOne
join two in listTwo on one.Id equals two.Id
where one.SomeKey != two.SomeKey
select one;
Update: It seems that some people feel that this is not answering the question, as it supposedly is not using lambdas. Of course it is, it's just using the friendly query syntax.
Here's the exact same code, only less readable:
var result =
listOne.Join(listTwo, one => one.Id, two => two.Id, (one, two) => new { one, two })
.Where(p => p.one.someKey != p.two.someKey)
.Select(p => p.one);