Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFeature Proposal : interceptors #627
Conversation
|
Things I don't like about this impl:
OrmLite already has I could even add a list of typed filter callbacks similar to Typed Request Filters but don't want to bake this opinionated impl in OrmLite, but you should be able to implement it with the filters OrmLite makes available. |
|
@mythz hey Demis, great thanks for you feedback.
About Async over Sync you're right I was thinking a lot about it, the problem is that if you have the Async and Sync methods is weird that if your interceptor is Async and your are performing a Sync Insert they are not being called. Let me figure it out a little bit more this. Thanks again for you feedback :) I was facing a few scenarios where I needed something like this and thought it could be a good idea to bring to the SDK. |
Motivations to Implement this feature.
OrmLite Insert, Update Filters are well, however they can lead into few limitations.
Proposal
Interceptors.
They are basically classes that implement
C# IEntityInterceptorinterface.This will be executed for each Insert, Update call for an entity.
Benefits using this approach.
At code level
Code implemented and unit tests added.
Usage:
Registration is straight forward
Feature proposal: