using System.Collections.Generic; namespace MAX.Models { public class ProductCatalogue { public Network AddNetwork(int id, string name) { var network = new Network() { Id = id, Name = name }; Networks.Add(network); NetworkMap.Add(id, network); return network; } public Product AddProduct(Network network, int id, decimal faceValue, string description, Batch.Vouchertype voucherType, decimal discountPercentage) { var product = new Product() { Id = id, Network = network, FaceValue = faceValue, Description = description, VoucherType = voucherType, DiscountPercentage = discountPercentage }; network.Products.Add(product); ProductMap.Add(id, product); return product; } public List Networks { get; set; } = new List(); public Dictionary NetworkMap { get; set; } = new Dictionary(); public Dictionary ProductMap { get; set; } = new Dictionary(); } }