O'Reilly logo

Hands-On Design Patterns with C# and .NET Core by Jeffrey Chilberto, Gaurav Aroraa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required