Creating the TaskManager project
The TaskManager
project will be created by using Microsoft's Blazor WebAssembly App project template to create a hosted Blazor WebAssembly app. First, we will examine the demo project created by the project template. Then, we will add a TaskItem
class and a TaskItemsController
class. We will use Entity Framework migrations to create a database in SQL Server. Finally, we will demonstrate how to read data, update data, delete data, and add data using the HttpClient
service.
Getting started with the project
We need to create a new Blazor WebAssembly app. We do this as follows:
- Open Visual Studio 2019.
- Click the Create a new project button.
- In the Search for templates (Alt+S) textbox, enter
Blazor
and then hit the Enter key.The following screenshot shows the Blazor WebAssembly App project template that we will be using:
- Select the Blazor WebAssembly App project template...