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

Support LINQ queries on Nullable enums

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.5
    • 1.4.2
    • None
    • None

    Description

      Given these classes:

      public enum E
      {
          A,
          B
      }
       
      public class C
      {
          public ObjectId Id;
          public E? E;
      }

      support queries like:

      var query =
          from c in collection.AsQueryable()
          where c.E == E.A // or null
          select c;

      Investigate whether more work is needed to support Nullable<T> in general (might result in a new JIRA).

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: