-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.2.3
-
Component/s: API
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
We have a collection that stores many object types. While they're all rooted around the same base class, we occasionally want AND together FilterDefinitions from multiple related classes. It would be great to have a generic FilterBuilder that would allow the Anding' together of unique types of FilterDefinition types without getting angry.
Previously we could
Query.And(Query<Email>.EQ(linqdef), Query<PasswordEmail>.EQ(linqdef2))
and get back a basic IMongoQuery, on which we could do some further things like sorting, etc.
This let us have a series of logic points and inject find parameters for different types and get the expected result. Given that multiple types can reside in one collection (and thus could be supported in 1 FilterDefinition), there should be a less rigid method for cases where this is the desired outcome.
It would be useful for it to work when using the "&" or "|" methods as well.
- is related to
-
CSHARP-1668 Allow FilterDefinition OfType to allow for querying of inherited types with type safety in builder
-
- Closed
-