//Creating a Product constructor public ProductCatalog() { Products = new Dictionary<string, Product>(); Products["UY1122NB"] = new Product() { Id = "UY1122NB", Name = "Coloring Book", Price = 10.99m }; Products["UY1135NB"] = new Product() { Id = "UY1135NB", Name = "String Cheese", Price = 3.05m }; Products["UY2345NB"] = new Product() { Id = "UY2345NB", Name = "Dark Chocolate Cookies", Price = 4.99m }; }
public ProductCatalog() { Products = new Dictionary<string, Product>(); Products["UY8890NB"] = new Product() { Id = "UY8890NB", Name = "FirstProduct", Price = 1.5m }; Products["AB8890NA"] = new Product() { Id = "AB8890NA", Name = "SecondProduct", Price = 1.2m }; Products["CC8890CC"] = new Product() { Id = "CC8890CC", Name = "ThirdProduct", Price = 2.0m }; }