Hi, my OData service doesn't support In statement and I need to make code like that:
var emails = new[] {"email1@gmail.com", "email2@yahoo.com"}
var builder = ODataQueryBuilder(baseUrl).For<MyEntity>(nameof(MyEntity)).ByList()
for(email in emails) {
builder.Filter(t => t.Email== email)
}
but this code will generate Url like tha
baseUrl/MyEntity?$filter=Email eq 'email1@gmail.com' and Email eq 'email2@yahoo.com'
How can I get the filter dynamically with OR statement instead of AND? I would like to have code like that
for(email in emails) {
builder.OrFilter(t => t.Email== email)
}
that will generate this url
baseUrl/MyEntity?$filter=Email eq 'email1@gmail.com' or Email eq 'email2@yahoo.com'
Is it possible to add such support? Thanks
Hi, my OData service doesn't support In statement and I need to make code like that:
but this code will generate Url like tha
baseUrl/MyEntity?$filter=Email eq 'email1@gmail.com' and Email eq 'email2@yahoo.com'How can I get the filter dynamically with OR statement instead of AND? I would like to have code like that
that will generate this url
baseUrl/MyEntity?$filter=Email eq 'email1@gmail.com' or Email eq 'email2@yahoo.com'Is it possible to add such support? Thanks