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

Support of Inline Conditional-to-FilterDefinition

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.1
    • Component/s: API, Linq
    • Labels:
      None

      As a developer I want to be able to use iniline conditional statement in lamda expressions that generate filter definitions.

      Example:
      var posts = await blogContext.Posts.Find(p => (tag != null) ? p.Tags.Contains(tag) : true).ToListAsync();

      currently in version 2.0.0.788 the above throws an error:
      Unsupported filter: IIF(False, Serialization(Tags).Contains(null), True).

            Assignee:
            Unassigned Unassigned
            Reporter:
            gpanagopoulos Georgios Panagopoulos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: