title: NHIbernate ICriteria conditional disjunction
body: <p>I've got a working Criteria, but I want to make my method more flexible.</p>
  
  <p>one of the pieces of my criteria looks like this: </p>
  
  <pre><code>    .Add(
          nhc.Restrictions.In("GroupID", groupIDs)
          || nhc.Restrictions.Eq("UserIDScheduled", userID));
  </code></pre>
  
  <p>but what I need to do is check if the groupIDs &amp; userID params actually have values before adding them here, because otherwise I'll get unexpected results/query. for instance, If i want to get the entities where GroupID is in x,y,z, but not include the userid in the OR if it's null.</p>
  
  <p>I can have a 3-case IF statement that does this, but it seems like there should be another way to do it in-line? (if userID == null, only .Add(..In(GroupID) ..), if groupIDs == null, etc.)</p>
  
  <p>I'm obviously not very familiar with the ICriteria API so I'm not sure what it's capabilities are.</p>