title: Error in IQueryable + foreach
body: <p>I just want to know if there is any known issue, or if I'm doing something wrong. Everytime I do something like the example below, I get an error <strong>"the server failed to resume the transaction".</strong></p>
  
  <p>I had already asked another question about this error, but now I've figured out it only appears in the <code>foreach</code> loops </p>
  
  <pre><code>            //Listing orders
              IQueryable&lt;Order&gt; ordersList = ListOrders();
  
              foreach (Order order in ordersList)
              {
                      if (order.Client_Id != null) //get the exception here.
                      {
                          //some code
                      }
              }
  </code></pre>
  
  <p><strong>Update</strong>: the code for ListOrders()</p>
  
  <pre><code>    public IQueryable&lt;Order&gt; ListOrders()
      {
          try
          {
              return from o in db.Orders
                     where o.Id == this.Id
                     select o;
          }
          catch (Exception ex)
          {
              throw new Exception(ex.Message, ex);
          }
      }
  </code></pre>