How to run query specified below using c# driver

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Blocker - P1
    • None
    • Affects Version/s: 1.10.1
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I am running following query in RoboMongo which seems to work fine.
      db.runCommand(
      {"find":"Equity","filter":{"Ticker": "IBM US Equity"}}
      )

      I want to run same query using C# driver version - 1.10.1.73
      I see following error while running query:
      Command 'find' failed: Failed to parse: filter: "'Ticker': 'IBM US Equity'". 'filter' field must be of BSON type Object. (response:

      { "waitedMS" : NumberLong(0), "ok" : 0.0, "errmsg" : "Failed to parse: filter: \"'Ticker': 'IBM US Equity'\". 'filter' field must be of BSON type Object.", "code" : 9 }

      )

        1. Mongo Error.png
          Mongo Error.png
          51 kB
        2. image.png
          image.png
          55 kB
        3. image.png
          image.png
          55 kB
        4. C# Source Code.txt
          0.6 kB

            Assignee:
            Robert Stam (Inactive)
            Reporter:
            Nikhil Salunkhe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: