Skip to content
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

Support for Entity Framework 7 #48

Open
ghost opened this issue Nov 16, 2015 · 11 comments
Open

Support for Entity Framework 7 #48

ghost opened this issue Nov 16, 2015 · 11 comments

Comments

@ghost
Copy link

ghost commented Nov 16, 2015

Support is provided EF7 ?

@jcachat
Copy link
Collaborator

jcachat commented Nov 17, 2015

Sorry, EF 7 is not supported at this time. I'll leave this issue open until I have more to update.

Right now, all I know is that many of the EF classes and interfaces I need either don't exist any more, have been renamed, or I just haven't figured out which of the 27 NuGet packages I need to install to find them.

@hikalkan
Copy link

As EntityFrameworkCore RC2 is released, do you have any update on that?
Thanks.

@jcachat
Copy link
Collaborator

jcachat commented Jun 20, 2016

As of now, there are no lifecycle hooks in EF Core/7. See this issue where it is being tracked: dotnet/efcore#626.

Nothing can be done at all until they make that available.

@hikalkan
Copy link

I see, thanks for sharing this.

@jcachat
Copy link
Collaborator

jcachat commented Jul 20, 2017

For anyone watching for this in EF Core, please see here: https://blogs.msdn.microsoft.com/dotnet/2017/05/12/announcing-ef-core-2-0-preview-1/

and search for "Global Query Filters".

I don't know how it compares to the functionality in this library but maybe it will meet your needs. And hopefully they will continue to expand it in future releases.

@drewburlingame
Copy link

Looks like IDbCommandInterceptor has been implemented. Any plans to support it? dotnet/efcore#626

@JonathanMagnan
Copy link
Member

Hello @drewburlingame ,

EF Core already have their own query filters: https://learn.microsoft.com/en-us/ef/core/querying/filters

So the question, I guess, is more what is missing now from EF Core global query filters that this library could bring?

@drewburlingame
Copy link

The problem with the existing query filters feature is that 'IgnoreQueryFilters' will ignore all filters. It's not possible to prevent filters from being accidently ignored. Using query filters for multitenancy is risky.

@JonathanMagnan
Copy link
Member

Hello @drewburlingame ,

So the problem with EF Core filtering is that you cannot just ignore a specific filter, from what I understand. It is either all or nothing, which doesn't really work well with multi-tenancy scenarios since you want to always at least keep this one filter.

(For reference purposes, it looks to have been reported on this issue: dotnet/efcore#8576, which also has a refused pull here: dotnet/efcore#24892)

It might not be perfect due to limitation, but EF Plus already have QueryFilter that allow enabling/disabling one or many filters: https://entityframework-plus.net/ef-core-query-filter

I talked with my developer, and at this moment, we feel that re-writing EntityFramework.DynamicFilters would probably take us a lot of time (pretty much no code is compatible with EF Core) for something that will eventually come built-in with EF Core. So, unfortunately, I don't think this library will ever be ported to EF Core (at least, not directly by us).

@drewburlingame
Copy link

@JonathanMagnan thanks for the response. It's probably wise not to spend the time porting. I agree, it will likely be resolved in EF Core at some point.

On a side note, while the associated docs states it does not support EF Core, there have been responses to issues that left me wondering if it was planned or would be taken on at some point. It would be helpful to put an explicit statement in the readme that this does not support EF Core and there are no plans for it to ever support EF Core.

Cheers,
Drew

@JonathanMagnan
Copy link
Member

Good point,

I added a small text and will re-work it during the weekend and do the same on the website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants