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

Make Query Syntax Async method!

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.4.4
    • Linq
    • Fully Compatible

    Description

      There are no async method in Linq Query Syntax when you want to retrieve an object.

      For example:

      var peter = await (from x in collection.AsQueryable()
      where x.Name == "Peter"
      select x).FirstOrDefaultAsync();

      This will create an error. FirstOrDefaultAsync() does not exist. However, FirstOrDefault() does exit.

      But the async method exists in Linq Method Syntax.

      I also wrote it in Stackoverflow here: https://stackoverflow.com/questions/47169729/is-mongodb-c-sharp-driver-linq-query-syntax-missing-async-method?noredirect=1#comment81290069_47169729

      It would be so awesome if we could get this feature

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            Assassinbeast Danny Chu [X]
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: