Creating the Shopping Cart Project

Learn how to create our project in Blazor WebAssembly using the Blazor WebAssembly project template.

The ShoppingCart project will be created by using the Empty Blazor WebAssembly App project template. First, we will add logic to add and remove products from the shopping cart. Then, we will demonstrate that the cart's state is lost when we navigate between pages. To maintain the cart's state, we will register a service in the DI container that uses the AppState pattern. Finally, we will demonstrate that by injecting the new service into the relevant components, the cart's state is not lost.

Getting started with the project

Get hands-on with 1200+ tech skills courses.