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

Strong Typed Query/Update/SortBy/Etc Builders

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.5
    • 1.4.2
    • Feature Request
    • None

    Description

      It would be great to reduce the use of "magic strings" when using the query/update builders. If there could be a new Builder<T> static types (like Query<T> and Update<T>) which would have methods similar to the following signature:

      Query.EQ(Func<T, object> name, BsonValue value)

      It could be used like this:
      Query.EQ<Account>(a => a.Email, "test@test.com")

      Attachments

        Activity

          People

            craig.wilson@mongodb.com Craig Wilson
            rhoffman Ryan Hoffman
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: