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

Strong Typed Query/Update/SortBy/Etc Builders

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5
    • Affects Version/s: 1.4.2
    • Component/s: Feature Request
    • None

      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")

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

              Created:
              Updated:
              Resolved: