Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-5496

Comment on: "mongodb-ecosystem/drivers/csharp.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None

    Description

      Hi,

      I am trying to insert more than one record in a process with this code .

      public static async Task<List<Entity>> InsertEntities(List<Entity> values)

      { string connectionString = "mongodb://127.0.0.1:27017"; MongoClient client = new MongoClient(connectionString); IMongoDatabase db = client.GetDatabase("OOSM"); var collection = db.GetCollection<Entity>("Entities"); await collection.InsertManyAsync(values); return values; }

      But it only inserts one of three items in the list.

      I couldn't find any solution.

      Regards,
      Serkan Uz

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 38 weeks, 1 day ago