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

XMLWordPrintableJSON

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

      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
              Reporter:
              Ian Mercer
              Votes:
              7 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: