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

Dictionary serializers should implement IBsonDocumentSerializer

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.1
    • None
    • None
    • None

    Description

      With a model like so:

      public class Foo
              {
                  [BsonDictionaryOptions(DictionaryRepresentation.ArrayOfDocuments)]
                  public Dictionary<string, object> Properties { get; set; }
              }

      We should be able to write a query like so:

      foos.Where(x => x.Properties["life"] == 42);

      Cheers
      Stefan

      Attachments

        Activity

          People

            craig.wilson@mongodb.com Craig Wilson
            stefan.sedich Stefan
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: