title: ICriteria adding Or Restrictions
body: <p>I need to do a select as follows</p>
  
  <pre><code>select * from produtos where Value = 10 or Value = 15 or  Value= 20 ....
  </code></pre>
  
  <p>being that I do not know how many values ​​will come, it will be in a loop on a list that the user will decide how many values ​​will be ... the problem is that if I do Criteria</p>
  
  <pre><code>ICriteria criterion = session.createCriteria(typeof (Product) "produto"). SetCacheable (true);
  criterio.Add (Restrictions.Eq ("produto.Valor", 10));
  criterio.Add (Restrictions.Eq ("produto.Valor", 15));
  criterio.Add (Restrictions.Eq ("produto.Valor", 20));
  </code></pre>
  
  <p>is made with a select clause "and"</p>
  
  <pre><code>select * from produtos where Value=10 and Value = 15 and  Value= 20 ....
  </code></pre>
  
  <p>can not use the Restriction "in" because I can have place in the Restrictions.Eq  Restrictions.Ge or Restrictions.Le or any other clause ...</p>
  
  <p>There is some way to go just adding clauses in Criteria? something like</p>
  
  <pre><code>criteria.Add (Restrictions.Or (Restrictions.Eq ("produto.Valor", 10)));
  criteria.Add (Restrictions.Or (Restrictions.Eq ("produto.Valor", 15)));
  criteria.Add (Restrictions.Or (Restrictions.Eq ("produto.Valor", 20)));
  criteria.Add (Restrictions.Or (Restrictions.Eq ("produto.Valor", 25)));
  </code></pre>
  
  <p>I understand that it uses some kind of expression like link but did not understand how this could help me to go riding a select, for example, say I have a foreach and for each item I need to get this foreach adding an "or" in the criteria,</p>
  
  <pre><code>foreach (var item in items)
  {
      criteria.Add("or item.Valor =" item.Valor);
  }
  </code></pre>
  
  <p>I can only criteria in this:</p>
  
  <pre><code>foreach (var item in items)    
  {
      criteria.Add(Restrictions.Eq("item.Valor", item.Valor));
  }
  </code></pre>
  
  <p>What would a "and" or it. But that would not or could add another criteria to that.</p>
  
  <p>I would have wanted that over the same situations</p>
  
  <pre><code>foreach (var item in items)
  {
      var items = session.QueryOver&lt;Item&gt;()
                         .WhereRestrictionOn(c =&gt; c.Valor item.Valor == | |?)
                         .List&lt;Item&gt;();
  }
  </code></pre>