Lambda Expression Search
I want to perform the equivalent of a 'dynamic SQL' search for a product with variable search criteria, but in C# code. For example, a product is defined like this:

    class Product
    {
      public decimal Price { get; set; }
      public int Quantity { get; set; }
    }

My search control has a textbox for price and a textbox for quantity. If the user specifies something, it should be included in the search (otherwise not). In reality, my product has many more than 2 properties.

How can I build a lambda expression generically based on any such search by variable criteria?

Thanks!

Lambda Expression Search
===

I want to perform the equivalent of a 'dynamic SQL' search for a product with variable search criteria, but in C# code. For example, a product is defined like this:

    class Product
    {
      public decimal Price { get; set; }
      public int Quantity { get; set; }
    }

My search control has a textbox for price and a textbox for quantity. If the user specifies something, it should be included in the search (otherwise not). In reality, my product has many more than 2 properties.

How can I build a lambda expression generically based on any such search by variable criteria?

Thanks!
