Adding the TaskItem class and API controller
Understand how to add a TaskItem class to your shared project and create an API controller with Entity Framework in the server project. This lesson guides you through integrating the data model and controller setup necessary for managing tasks in a Blazor WebAssembly application with ASP.NET Web API.
We'll cover the following...
We'll cover the following...
We need to add the TaskItem class. We do this as follows:
- Right-click the
TaskManager.Sharedproject and select the “Add, Class” option from the menu. - Name the new class
TaskItem. - Click the “Add” button.
- Make the class public by adding the
publicmodifier:
...