title: Subsonic - query with optional parameters
body: <p>Using C# 3.5 through VS 2008 and subsonic 2.2.
  Anyone know if it's possible to create a subsonic query that essentially has an 'IF' in the middle of it, depending on whether a passed parameter was, for example, greater than zero.</p>
  
  <p>For example, a delete method that has two passed parameters - A and B.</p>
  
  <p>I want something like (pseudo code)</p>
  
  <pre><code>DELETE from Products
  Where productId = A
  if(B &gt; 0)
  {
  AND ProductAttributeId = B
  }
  </code></pre>
  
  <p>Obviously it wouldn't need the actual 'IF' clause in there but that's the essence of what I'm trying to do with subsonic. I know I can just have two different queries depending on whether the parameter is there or not but I was wondering if there's a cleaner way of doing it.</p>
  
  <p>Thanks.</p>