using System.Collections.Generic;
public class PricingBrochure
public string BrochureName {get; set;}
public DateTime ApplicableFrom {get; set;}
public int YearOffset {get; set;}
public PricingBrochure(string brochure, DateTime dateFrom, int offset)
this.BrochureName = brochure;
this.ApplicableFrom = dateFrom;
this.YearOffset = offset;
public List<PricingBrochure> GenerateTestBrochures()
List<PricingBrochure> retVal = new List<PricingBrochure>();
retVal.Add(new PricingBrochure("January 2020", new DateTime(2020, 01, 01), 200));
retVal.Add(new PricingBrochure("July 2020", new DateTime(2020, 07, 01), 210));
retVal.Add(new PricingBrochure("January 2021", new DateTime(2021, 01, 01), 220));
retVal.Add(new PricingBrochure("July 2021", new DateTime(2021, 07, 01), 230));
retVal.Add(new PricingBrochure("January 2022", new DateTime(2022, 01, 01), 240));
retVal.Add(new PricingBrochure("July 2022", new DateTime(2022, 07, 01), 250));
public int OrderID {get; set;}
public DateTime SoldDate {get; set;}
public Order(int orderID, DateTime soldDate)
this.SoldDate = soldDate;
public List<Order> GenerateTestOrders(int quantity)
List<Order> retVal = new List<Order>();
Random rand = new Random();
for(int i = 0; i < quantity; i++){
retVal.Add(new Order(rand.Next(1000000, 1999999), DateTime.Now.AddDays(-1 * rand.Next(1, 730))));
public static void Main()
PricingBrochure pb = new PricingBrochure();
List<PricingBrochure> pbList = pb.GenerateTestBrochures();
List<Order> oList = o.GenerateTestOrders(1000);
oList.ForEach(x => Console.WriteLine(x.OrderID.ToString() + " | " + x.SoldDate.ToShortDateString()));
Console.WriteLine("Completed");