You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think, filter query params could be simple parsed to triplets like <key,value,operation> (as you have it now, but key and operation would be an arbitrary string). Then to support attribute filtering out of the box, in DefaultRepository.Filter check if filter key is a valid attribute, and operation is supported, then construct new FilterQuery and pass it to IQueryable.Filter
this way you can keep filtering code for EF
and then if user wants to have custom filters - he just have to override Repository.Filter and handle his custom filters before default.
and pass everything else to base class
Proposal
Rename FilterQuery to AttrFilterQuery
Create new FilterQuery with raw request (string) information
AttrFilterQuery accepts FilterQuery as a constructor parameter and the attribute mapping in QuerySet should be moved here
DefaultEntityRepository constructs AttrFilterQuery from FilterQuery
Document override procedure
Breaking Changes
The FilterQuery class is changing and could affect custom implementations of IEntityRepository
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Proposed by @jfhs:
Proposal
FilterQuery
toAttrFilterQuery
FilterQuery
with raw request (string) informationAttrFilterQuery
acceptsFilterQuery
as a constructor parameter and the attribute mapping inQuerySet
should be moved hereDefaultEntityRepository
constructsAttrFilterQuery
fromFilterQuery
Breaking Changes
FilterQuery
class is changing and could affect custom implementations ofIEntityRepository
The text was updated successfully, but these errors were encountered: