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

Deprecate MongoServer and MongoDatabase indexers in favor of GetDatabase and GetCollection

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.8
    • Affects Version/s: 1.7
    • Component/s: None
    • Labels:
      None

      The MongoServer and MongoDatabase indexers are redundant with the GetDatabase and GetCollection methods. While they have the advantage of brevity, they have the disadvantage of not being pure indexers (some of the arguments don't feel like indexes) and they also can't take type parameters which certain overloads of GetCollection require.

      Rather than have two ways of doing the same thing we are going to deprecate the indexers and standardize on GetDatabase and GetCollection.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: