We currently have no concept of a "product" on the server side of our application, so let's remedy that by creating a product entity and migration to start off with. Create a Data/Entities/Product.cs class with the following contents:
namespace ECommerce.Data.Entities{ public class Product { public int Id { get; set; } [Required] public string Name { get; set; } [Required] public string Slug { get; set; } [Required] public string Thumbnail { get; set; } [Required] public string ShortDescription { get; set; } [Required] public string Description { get; set; } [Required] public decimal Price { get; set; } }}
The properties of this class match the properties that we've been rendering in our UI so far. We've also added ...