Search⌘ K
AI Features

Adding the API Controllers

Explore the process of adding API controllers to a Blazor WebAssembly project for an Expense Tracker. Learn to create controllers using Entity Framework for managing Expense and ExpenseType models, enabling the app to interact with backend data through API endpoints.

We'll cover the following...

We need to add an API controller for each of the new classes. We do this as follows:

  1. Right-click the ExpenseTracker.Server.Contollers folder and select the “Add, Controller” option from the menu.

  2. Select the “API Controller with actions, using Entity ...