From the course: Advanced Web APIs with ASP.NET Core 8

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Searching items

Searching items

- [Instructor] Implementing a full featured search is the highlight of every developer's career. Well, almost every developer's career. On the other hand, there's something called Google, and they're probably doing this just so much better. Therefore, I would say if you just implement a rather simple search, you should be good. We could search for a specific field and then just look for a substring of the search term, or we could look for a perfect match. In both cases, the implementation is rather simplistic. We just check here whether say the name of a product contains the search string and we convert both of them, the search string and the product name, to lowercase letters so that the search is more or less case sensitive. Let's do that. Let's use both approaches in our API. A perfect match and a partial match. For that, we head over to our ProductQueryParameters again, and we are adding new parameters. One is the SKU, stock keeping unit, and I initialize this with an empty…

Contents