-
-
Notifications
You must be signed in to change notification settings - Fork 160
Closed
Labels
Milestone
Description
I am currently writing an IEntityRepository implementation for MongoDB, for which there is no EF support.
The code for Filter and Sort is the same and PageAsync only differs in its query realization in that instead of ToListAsync() it is ToAsyncEnumerable().ToList().
To avoid code duplication for those methods I suggest adding an abstract class that handles Filter, Sort and PageAsync for all DB drivers that can provide an IQueryable<>, with an abstract method for DB-specific query realization.
That abstract class would only depend on IJsonApiContext.
Alternatively the query realization could be in its own interface for DI.
What do you think?