Understanding what happens during a complex LAMBDA query


LAMBDA expressions were introduced in C# 3.0 (.NET 3.5) along with LINQ. The LAMBDA expression is a shorter way of representing anonymous methods using special syntax.

For example, the following anonymous method checks if the customers balance is over $1000:

Anonymous method in C#:

The above anonymous method can be rewritten using the following:

Lambda Expression in C#:

c => c.Balance > 1000 Below is a more complex LAMBDA expression:

comments powered by Disqus