how to pass multiple parameter to a breeze controller in the url
-
21-12-2019 - |
Question
BreezeWebApiConfig GlobalConfiguration.Configuration.Routes.MapHttpRoute( name: "BreezeApi", routeTemplate: "breeze/{controller}/{action}" );
i have a breeze controller
[HttpGet]
public IQueryable<Customer> Customers()
{
return _context.Customers;
}
http://hostname:55946/breeze/Breeze/Customers?$filter=Country eq 'USA'
WORKS FINE
but when i pass 2 filter conditions as bellow, but the query just executes for the first parameter, ignoring the 2nd parameter????
http://hostname:55946/breeze/Breeze/Customers?$filter=Country eq 'USA' && Region eq 10
Solution
OData query syntax uses 'and' to join query clauses so try:
http://hostname:55946/breeze/Breeze/Customers?$filter=Country eq 'USA' and Region eq 10
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow