Base solution for your next web application
Open Closed

How to implement data filter in specific scenarios #7864


User avatar
0
j.chow created

Hi,

i just want to add data filter in some application service, how can i do?

Work correct(code in appdbcontext)

not working (what something wrong in code)


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    I believe you have read this article(https://aspnetboilerplate.com/Pages/Documents/Articles\How-To\add-custom-data-filter-ef-core), but your code is incomplete, can't confirm the problem.

    Can you use abp startup template(https://aspnetboilerplate.com/Templates) to reproduce your problem then share the code to me?

  • User Avatar
    0
    j.chow created

    hi maliming,

    i just use red tools add a entity and add some code in appdbcontext.cs。

    the MayHaveOrganizationUnit data filter is working correct.

    but when i remove the express from CreateFilterExpression method and add SetFilterParameter method in entity application service, that is not working.

    how can i share the code? need whiole solution?

    product vesion:asp.net core mvc jquery 7.2.3

  • User Avatar
    0
    maliming created
    Support Team

    You can share the code on github, I can download and check it.

    You don't need to use the Zero project, Use the abp startup template(https://aspnetboilerplate.com/Templates)

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.