title: NHibernate Criteria Restriction vs Expression
body: <p>If I search for NHibernate Criteria API query examples in internet there are examples that use Restrictions and others use Expression. What are the differences between those two?</p>
  
  <p>For example:</p>
  
  <pre><code>posts = session.CreateCriteria&lt;Post&gt;()
      .Add(Expression.Eq("Id", 1))
      .List&lt;Post&gt;();
  
  posts = session.CreateCriteria&lt;Post&gt;()
      .Add(Restrictions.Eq("Id", 1))
      .List&lt;Post&gt;();
  </code></pre>