Introduction
- Build Tree, compile to Func -> pass it to the Where
- LINQ uses lambda expressions to build an expression tree, which it can then use to build a provider-specific query
Expression
- an instruction to do something
- a combination of operands (variables, literals, method calls) and operators that can be evaluated to a single value
- a set of stuff that produces a value
- smaller than function
- e.g x < 5
why we put the expression in the tree?
Complex expression can be easily evaluated using the expression tree
Or
x>1 x< 10
delegate
- delete allows you to construct how the function works at run time
- we are pushing design-time to run-time