title: Dynamic Where condition with Queryover
body: <p>I have an application and I'm trying to implement DDD concepts. I have my repository class with some method to list entities. I would like to know how can I do a query with QueryOver to filter separating with <code>AND</code> operator, when the parameter is filled, sample</p>
  
  <pre><code>public IEnumerable&lt;Product&gt; FindProducts(string name, decimal? price, DateTime? validDate, int? stock, int? idSupplier)
  {
     var query = Session.QueryOver&lt;Product&gt;().OrderBy(x =&gt; x.Name).Asc;
  
     if (!string.IsNullOrEmpty(name))
        // add where condition for name parameter
  
     if (price.HasValue)
        // add 'AND' where condition for price parameter
  
     if (validDate.HasValue)
        // add 'AND' where condition for validDate parameter
  
     if (idSupplier.HasValue)
        // add 'AND' where condition for idSupplier parameter
  
     // other possible conditions
  
     return query.List();
  }
  </code></pre>
  
  <p>Is there any way to do that before I use HQL string query? hehehe</p>
  
  <p>Thank you!</p>