private bool IdChecker(Category cate) { if (cate.CategoryID < 101 || cate.CategoryID > 200) return false; else return true; }
static void Main(string[] args) { Product product1 = new Product("green apple", 1, 102); Product product2 = new Product("melon", 3, 102); Product product3 = new Product("pear", 4, 102); Product product4 = new Product("red apple", 2, 102); Product product5 = new Product("strawberry", 5, 102); Product product6 = new Product("TV", 6, 105); Product product7 = new Product("laptop", 7, 105); Product product8 = new Product("fridge", 10, 105); Product product9 = new Product("microwave", 11, 105); Product product10 = new Product("hat", 21, 112); Product product11 = new Product("jacket", 23, 112); Product product12 = new Product("shoes", 24, 112); Category category1 = new Category(102, "Fruits"); Category category2 = new Category(105, "Devices"); Category category3 = new Category(112, "Clothes"); Order order1 = new Order(211, new List<int>() { 1, 3, 4, 2, 5 }, new DateTime(2016, 1, 1), "Fruit Order"); Order order2 = new Order(222, new List<int>() { 6, 7, 10, 11 }, new DateTime(2016, 1, 4), "Device Order"); Order order3 = new Order(233, new List<int>() { 21, 23, 24 }, new DateTime(2016, 1, 10), "Clothes Order"); Order order4 = new Order(244, new List<int>() { 1, 3, 4 }, new DateTime(2015, 12, 11), "Fruit Order 2"); //linq2();linq3();linq1(); Console.WriteLine(); linq6(); }