Make IMongoCollection covariant

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Works as Designed
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.5
    • Component/s: BSON
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      For my app, I'd like to define the following property on my data context class:

      public IMongoCollection<BsonDocument> C => data.GetCollection<RawBsonDocument>( "c" );

      My purpose is to have a single IMongoCollection instance from which I can retrieve raw documents, but into which I can also insert non-raw ones.

      This improvement involves adding `out` to IMongoCollection's definition:

      public interface IMongoCollection<out TDocument>

            Assignee:
            Vincent Kam (Inactive)
            Reporter:
            Adrian Pinter
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: