Hi,
I'm wondering if something like this is already possible:
I would like to have a default PredicateFactory for my entities, similar to the IConcurrencyPredicateFactory, that would always add a predicate when fetching an entity.
This could be useful in some occasions:
- Soft deleting entities
- Date range filtering for active entities
- Security filtering on entities
- etc.
For example I have an entity with a Deleted bit field, and by default I would never want entities where Deleted=1, but I don't want to add the predicate on all my (LinqMetaData) fetches, especially with prefetching related entities it tends to get a bit messy.
The deleted bit isn't that bad, but prefetching combined with security predicates or date range filtering it becomes impossible to follow within no time.
With the 'old' predicate system it would be easy to make 'reusable' predicates, however I'm looking for something that works on the background together with LinqMetaData fetches.
Thanks!
Wiebe