Adding new/updating existing entities

In order to store these things, we need a number of new entities, which will have the following relationships in the database:

Product catalog database structure

The first of these new entities is the Brand entity, which looks like this:

namespace ECommerce.Data.Entities{  public class Brand  {    public int Id { get; set; }    [Required]    public string Name { get; set; }        public List<Product> Products { get; set; } = new List<Product>();  }}

These entities are very simple and self-explanatory, and, seeing as we have a lot to cover in this chapter, we'll scoot over these pretty quickly. The next one we need is a ...

Get ASP.NET Core 2 and Vue.js 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.