Beispiel #1
0
        internal static void AddNewCandy(CandyStorage db)
        {
            Console.WriteLine("Add your candy's name, manufacturer, category, and flavor. Add each information on a new line");

            DateTime localDate = DateTime.Now;
            var      candyGood = new Candy
            {
                CandyId      = db.ListMax(),
                Name         = Console.ReadLine(),
                Manufacturer = Console.ReadLine(),
                Category     = Console.ReadLine(),
                DateReceived = localDate.ToString(),
                Flavor       = Console.ReadLine()
            };

            db.AddCandy(candyGood);
        }