-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data store command interception #1629
Comments
This is more generally covered by #626 but we'll leave this one active to track the particular scenario of intercepting database commands. Something like IDbCommandInterceptor from EF6.x. |
Is there a time frame for something like IDbCommandInterceptor to be added to EF7? Using EF6 with ASP.NET 5 is a pain compared to EF7, but I really need the IDbCommandInterceptor to implement seamless row level security in EF7. |
@excolo it will be post 1.0.0 release. You may be able to achieve something similar now if you start mucking around with replacing/wrapping low level services... but this item is about building a more usable experience. |
@rowanmiller Can you give a hint on which low level service to wrap? I tried overriding the Open function in SqlServerConnection but it seems like this class is used for accessing metadata and not data related to a DbContext
|
It might have to do with how I register the above class (I might have to do some more detective work to get it to work)
But when I run the following code from dbContext it will still return an instance of
|
@MariovanZeist use |
@rowanmiller I think i fell into the trap referenced by #4668 |
@MariovanZeist 👍 - the changes from #4668 are being worked on at the moment |
I put a question on stack-overflow to seek alternative techniques for EF Core. Instead of a heavyweight framework approach perhaps whatever replaces interceptors could be a very lightweight and simple pattern. |
Hi there
on a derived DbContext constructor. I would like to see a better approach using DI to pipe this injection? |
Is there any extensible point on where EF hits the db, something that can be overridable to log or do anything everytime a hit to the db.
im wondering of something like
if not, take it as a suggestion for EF7 :)
The text was updated successfully, but these errors were encountered: