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

Need an implicit conversion from Enums to Bson values

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.0
    • Affects Version/s: 0.9
    • Component/s: None
    • None
    • Environment:
      Win 7

      Implicit conversions are provided for most types but not for Enums. This makes querying for an Enum harder than it needs to be.

      Suggest adding this into the BsonValue class:

      public static implicit operator BsonValue(Enum value)

      { return BsonTypeMapper.MapToBsonValue(value); }

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            ianmercer Ian Mercer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: