Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How Set datafilter value from InputDto? #2196


User avatar
0
marcosli created

Is there a way to define a filter a value coming from an inputDto? I need the inputdto value to be specified in an API.

I tried all the options of the link [http://www.aspnetboilerplate.com/Pages/Documents/Data-Filters]) and the official github [https://github.com/jcachat/EntityFramework.DynamicFilters]), but I can not.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Can you explain it a bit more detailed ?

    As far as I understand, when someone calls your web api method, you want to apply this filter and set the value of some field. If so, you need to use a custom web api model binder. You can take a look at here for that <a class="postlink" href="https://www.asp.net/web-api/overview/formats-and-model-binding/parameter-binding-in-aspnet-web-api">https://www.asp.net/web-api/overview/fo ... et-web-api</a>.

    If I understand you wrong, please go ehead and explain.

    Thanks.