-
Today we build get/update/delete queries in a more or less centralized manner (Add queries are created within the respective model classes). Should we further centralize all but the Add related query code. Quick inventory shows we're creating queries in here: BaseDataModel BaseDataModelCollection ODataQuery & DataModelQueryService What if we would have a centralized QueryService that can be injected via DI and that will centralize all the query creation logic? This will make it easier to ensure both linq as regular approaches stay in sync with regard to the more advanced query options. This will also improve testability as we could write test cases that just focus on query building/validation. Adding @PaoloPia , @ypcode , @pkbullock and @JarbasHorst for awareness. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Again great improvement for general quality and clearness of the code :) Great job @jansenbe (I am sorry for the leave of feedback, I usually get the notifications on the GitHub mobile app, but discussions are not included in it -_-) |
Beta Was this translation helpful? Give feedback.
-
I've centralized the BaseDataModel and BaseDataModelCollection code and wrote tests, so biggest part of this refactoring is done. |
Beta Was this translation helpful? Give feedback.
I've centralized the BaseDataModel and BaseDataModelCollection code and wrote tests, so biggest part of this refactoring is done.