From the course: Building and Securing RESTful APIs in ASP.NET Core
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Design collection search - ASP.NET Core Tutorial
From the course: Building and Securing RESTful APIs in ASP.NET Core
Design collection search
- [Instructor] The syntax for searching a collection will be similar to the sort syntax. The client will send a query parameter called search with a search expression as the parameter value. The search expression consists of a field, an operator, and a value separated by spaces. Different fields can support different operators. For example, a numeric field could support less than and greater than operators. Multiple search parameters can be used to create an and query over multiple fields. For the Land and Hotel API, modeling queries that contain a logical or won't be necessary. However, the approach we'll use is extensible and could be modified to support or queries in your API. Alright, let's get started.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.