Closed
Description
Proposed by @jfhs:
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
toAttrFilterQuery
- Create new
FilterQuery
with raw request (string) information -
AttrFilterQuery
acceptsFilterQuery
as a constructor parameter and the attribute mapping inQuerySet
should be moved here -
DefaultEntityRepository
constructsAttrFilterQuery
fromFilterQuery
- Document override procedure
Breaking Changes
- The
FilterQuery
class is changing and could affect custom implementations ofIEntityRepository