Building components using Blazor WebAssembly
Now we will reuse the same functionality in the Blazor WebAssembly project so that you can clearly see the key differences.
Since we abstracted the local dependency service in the INorthwindService
interface, we will be able to reuse all the components and that interface, as well as the entity model classes. The only part that will need to be rewritten is the implementation of the NorthwindService
class. Instead of directly calling the NorthwindContext
class, it will call a customer Web API controller on the server side, as shown in Figure 17.7:
Figure 17.7: Comparing implementations using Blazor Server and Blazor WebAssembly
Configuring the server for Blazor WebAssembly
First, we need a web service that the client app can call to get and manage customers. If you completed Chapter 16, Building and Consuming Web Services, then you have a customer service in the Northwind.WebApi
service project that you could use. However...