Giter Club home page Giter Club logo

Comments (11)

jcachat avatar jcachat commented on June 10, 2024

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.

from entityframework.dynamicfilters.

hikalkan avatar hikalkan commented on June 10, 2024

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

from entityframework.dynamicfilters.

jcachat avatar jcachat commented on June 10, 2024

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.

from entityframework.dynamicfilters.

hikalkan avatar hikalkan commented on June 10, 2024

I see, thanks for sharing this.

from entityframework.dynamicfilters.

jcachat avatar jcachat commented on June 10, 2024

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.

from entityframework.dynamicfilters.

drewburlingame avatar drewburlingame commented on June 10, 2024

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

from entityframework.dynamicfilters.

JonathanMagnan avatar JonathanMagnan commented on June 10, 2024

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?

from entityframework.dynamicfilters.

drewburlingame avatar drewburlingame commented on June 10, 2024

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.

from entityframework.dynamicfilters.

JonathanMagnan avatar JonathanMagnan commented on June 10, 2024

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).

from entityframework.dynamicfilters.

drewburlingame avatar drewburlingame commented on June 10, 2024

@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

from entityframework.dynamicfilters.

JonathanMagnan avatar JonathanMagnan commented on June 10, 2024

Good point,

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

from entityframework.dynamicfilters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.