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

Strong Typed Query/Update/SortBy/Etc Builders

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.5
    • Component/s: Feature Request
    • Labels:
      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

            • Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: