Adding the Product Class

Learn how to add C# classes to the Blazor WebAssembly project.

We'll cover the following

We need to add the products that are for sale. We do this as follows:

  1. Right-click the ShoppingCart project and select the “Add, New Folder” option from the menu.
  2. Name the new folder Models.
  3. Right-click the Models folder and select the “Add, Class” option from the menu.
  4. Name the new class Product.
  5. Click the “Add” button.
  6. Add the following properties to the Product class:

Get hands-on with 1200+ tech skills courses.