Combine Parameters (Or/And)
You can decide combining filtering parameters with OR (||
) / AND (&&
)
By default your parameters will be combined with &&
and if you're using swagger, you'll see CombineWith
parameter. This is enum and includes And
and Or
values. Default is 0
(And), you can send that parameter as 1
and you'll se your multiple parameters will be combined with ||
.
- Let say you have a model something like that again:
- Let's create a filtering DTO like that:
- Let's create a sample Controller and get the DTO from querystring
Case 1 (In-Code)
- You can define combining from code
Case 2 (From-Query)
- You can define combining from query string