Giter Club home page Giter Club logo

Comments (7)

jcachat avatar jcachat commented on June 10, 2024

Yeah, that's not right and I've reproduced the problem. In the meantime, I was going to suggest a filter like this:

modelBuilder.Filter("EntityEFilter", (EntityE e, int? tenantID) => (!e.TenantID.HasValue && !tenantID.HasValue) || (e.TenantID.HasValue && (e.TenantID == tenantID)), () => null);

but that also does not work (throws an exception).

I'll work on these issues.

from entityframework.dynamicfilters.

hikalkan avatar hikalkan commented on June 10, 2024

Thanks. I'll wait for it since my application is not working now :)

from entityframework.dynamicfilters.

jcachat avatar jcachat commented on June 10, 2024

I just pushed a fix for the exception when using the filter I posted above. If you can pull that down from github, you can set your filter like that and it will do what you need.

I'm still working on supporting the filter as just "e.TenantId == tenantId" (without all the .HasValue checks - which is how the sql will need to be generated). I'm going to wait on updating NuGet until that's fixed and I can check a couple other things.

from entityframework.dynamicfilters.

hikalkan avatar hikalkan commented on June 10, 2024

Thanks a lot.

I'm waiting your nuget package push in order to release ABP's new version :)
(aspnetboilerplate/aspnetboilerplate#434)

from entityframework.dynamicfilters.

jcachat avatar jcachat commented on June 10, 2024

Should be fixed now and NuGet has been updated.

from entityframework.dynamicfilters.

hikalkan avatar hikalkan commented on June 10, 2024

Thank you so much. I'll try it.

from entityframework.dynamicfilters.

hikalkan avatar hikalkan commented on June 10, 2024

It worked, thanks again.

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.