title: Paging in Entity Framework
body: <p>In Entity Framework, using LINQ to Entities, database paging is usually done in following manner:</p>
  
  <pre><code>int totalRecords = EntityContext.Context.UserSet.Count;
  var list     = EntityContext.Context.UserSet
                   .Skip(startingRecordNumber)
                   .Take(pageSize)
                   .ToList();
  </code></pre>
  
  <p>This results in <strong>TWO</strong> database calls.</p>
  
  <p><strong>Please tell, how to reduce it to ONE database call.</strong></p>
  
  <p>Thank You.</p>