Implementing CRUD pages

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 ...

Get Hands-On Design Patterns with C# and .NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.