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

Test full support for enums in filters

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • 2.19.0
    • 2.18.0
    • LINQ3
    • None

    Description

      The following fails:

      var value = (E?)E.B;
       
      var queryable = collection
          .AsQueryable()
          .Where(x => x.E == value);
      

      Where the types are:

      private class C
      {
          public int Id { get; set; }
          public E E { get; set; }
      }
       
      private enum E { A, B }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: