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

Allow FindDefinition to call .Find and append as an AND

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 2.2.3
    • Fix Version/s: None
    • Component/s: API, Feature Request, Linq
    • Labels:
      None

      Description

      We have a scenario in which we are currently using a Queryable version of the collection as an override to another method, which "pre-filters" a search.

      Given the performance gains of Builders vs Linq, We're attempting to migrate away from Linq / Queryable on calls which are made with some frequency.

      We'd love to do the same equivilent with a FilterDefinition

      class BaseClass<TRoot>

      { ... public IQueryable<TRoot> Queryable => Collection.AsQueryable(); }

      class SomeRepository : BaseClass<SomeType>

      { public override IQueryable<SomeType> Queryable => base.Queryable.Where(st => st.Feature.In(listOfAllowedFeatures); }

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: