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

Moving code from 1.x to 2.x

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.10.1, 2.2.3
    • Component/s: BSON, GridFS
    • Environment:
      Windows 7, Windows Server 2012

      I'm trying to port my code from the C# 1.x driver to the 2.x

      I was able to translate the queries to 2.x where I had trouble is with GridFS Upload and Delete was giving me trouble because I used GUIDs for IDs and 2.x wanted ObjectID.

      I attached my code file, the methods that gave me issues were SaveAttachment and DeleteEmail

      Delete email because I'm trying to delete the JSON doc and the associated GridFS file

      For now I'm using the 2.x MongoDB.Driver.Legacy and keeping my code as is but I would like to rewrite this code to 2.x format. I do need this code to run against a current 2.4 database and schema and I'm trying to future proof it to be 3.2 compatible when the MongoDB instances get upgraded to 3.2.

        1. DbRepository.cs
          8 kB
          Peter Bielek

            Assignee:
            Unassigned Unassigned
            Reporter:
            peter.bielek@cscglobal.com Peter Bielek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: