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

Add support for anonymous types

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None
    • All

    Description

      The C# driver should include support for anonymous types when manipulating documents.
      Example:
      var mongo = new Mongo();
      mongo.Connect();
      var db = mongo["testdb"];
      var col = db["categories"];
      var doc = new Document();
      doc.Append("Name", new

      { Foo = "Bar" }

      );
      col.Insert(doc);

      The same should work for querying, updating and deleting.

      Attachments

        Activity

          People

            sam Sam Corder
            felipecsl Felipe Lima
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: