title: RavenDB OrderBy
body: <p>In my C# application, I have a collection of objects which have an <code>int Order</code> property ranging from 1 to <em>n</em>.</p>
  
  <p>When I do like this:</p>
  
  <pre><code>var listings = session.Query&lt;Listing&gt;().Where(x =&gt; !x.IsDeleted &amp;&amp; x.CategoryId == category.Id &amp;&amp; x.WorkflowStatus == WorkflowStatus.Published).OrderBy(x =&gt; x.Order);
  </code></pre>
  
  <p>I get a collection of listings but not 100% in the correct order. As it stands the order goes:</p>
  
  <pre><code>0, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 28, 29, 3, 30, 31, 32, 33, 4 .... 
  </code></pre>
  
  <p>Any idea why the <code>OrderBy</code> doesn't do exactly as it should?</p>