In order to store these things, we need a number of new entities, which will have the following relationships in the database:
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 ...