Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1638

MongoDB Driver 2.2.3 IMongoCollection paging

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.2.3
    • None

    Description

      Hi,
      I upgrade my driver to 2.2.3
      In my previous version I use,

      MongoCollection.AsQueryable<TEntity>().Skip(skip).Take(count); 
      

      I can query with database pagination with MongoCollection.

      new driver I change it to IMongoCollection

      IMongoCollection.AsQueryable<TEntity>().Skip(skip).Take(count)

      {aggregate([{ "$skip" : 0 }, { "$limit" : 10 }, { "$match" : { "Name" : "a" } }])}
      

      For example
      with this query (I want to take 10 record) It get first ten records and then if two of them matches I get two record as a result.

      But I want to get first ten records which Name is a,and with this I can make database pagination.With old driver I brings first ten records which matches a,What should I do to achive database pagination in new driver with IMongoCollection

      Thanks

      Attachments

        Activity

          People

            Unassigned Unassigned
            biyildiz Bilgehan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: