In this section, we will start creating functional pages to create, update, and delete products. To get started, open your FlixOne solution, and add the following classes into the specified folders:
Models: Add the following files in the Models folder of the solution:
- Product.cs: The code snippet of the Product class is as follows:
public class Product{ public Guid Id { get; set; } public string Name { get; set; } public string Description { get; set; } public string Image { get; set; } public decimal Price { get; set; } public Guid CategoryId { get; set; } public virtual Category Category { get; set; }}
The Product class represents almost all the elements of the product. It has a Name, a complete Description, an ...