Operator-based switch for a database query filter
There are a few ways to approach this base on how much you want to minimize the code.

Define the predicates as actual functions and pass them in by name.

case Operator.Equal:
    tmpResult = tmpResult.Where(NumericEqual);
    break;


Use a temporary variable for the argument to Where()

Func&lt;T, Boolean&gt; predicate;
switch (enumOperator)
{
    case Operator.Equal:
        predicate = a =&gt; a.NUMERIC_VALUE == value;
        break;
    case Operator.Less:
        predicate = a =&gt; a.NUMERIC_VALUE &lt; value;
        break;
    // ...
}
tmpResult = tmpResult.Where(predicate);


This could also be done with a function that encapsulates the switch and hiding it from the main function. 

Or, if you feel like the switch statement is causing too much boilerplate, you could make a Dictionary&lt;Operator, Func&lt;T, Boolean&gt;&gt; and insert a function pointer for each operator. Then the code that uses it becomes:

tmpResult = tmpResult.Where(operatorMap[enumOperator]);


It is a trade off. The shorter code requires the use of more memory. Handling the case where enumOperator does not have match (which is not currently being done) would also have to change.



For the case where you will have lots of different properties that all need similar operations, you can have a function that creates the predicate.

Func&lt;T, Boolean&gt; MakePredicateEqual(Func&lt;T, X&gt; getField, X value)
{
    return a =&gt; getField(a) == value;
}


However, as things become more generic, more things need to be passed in as arguments and plumbing things together gets more complicated. It needs to be determined when the diminishing returns make it not worth it.