Connecting Client and Server with REST API
Having built the server side of our application, which can provide data for our Blazor WebAssembly application, we need to create some components that can consume the data. We can create these in a non-generic way and type a lot of code, or create generic components that will handle the same logic for each entity we have already created.
In this chapter, we will learn how to create Blazor components with generic parameters and how we can benefit from them in our application. We will also learn how to create the API endpoint to provide the data for our application.
In this chapter, we will cover the following topics:
- Exposing CRUD operations in API controllers
- Consuming a REST API in Blazor components