Sunday, July 29, 2012

Searching/Querying in .NET

- Delegates are good for defining a generic criteria parameter of search method -- no need to hard code criteria in loop of each of multiple search methods (see also Specifications)
- Lambdas obviate need to define named delegate implementations (or methods matching a generic .NET delgate type i.e. Predicate or Func)
- Expression trees to construct lambdas on the fly, allowing construction of criteria at run time

No comments:

Post a Comment