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

New GetCollection<T>() signature that uses a default collection name based on the Type of collection (NORM migration suggestion)

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 0.7
    • Component/s: Feature Request
    • Labels:
      None
    • Environment:
      Win 7, .NET 4, VS 2010

      If GetCollection<T> had a method that took no argument it would be easier for people to migrate from Norm to this driver. Simply construct a default collection name based on the type in use:-

      e.g. in MongoDatabase.cs

      public MongoCollection<TDefaultDocument> GetCollection<TDefaultDocument>()

      { string collectionName = typeof(TDefaultDocument).Name; return GetCollection<TDefaultDocument>(collectionName, safeMode); }

      This makes quick start / simple / common examples just a bit simpler and less error prone as there's no string value to get right.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ianmercer Ian Mercer
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: