コード例 #1
0
        private static void Main(string[] args)
        {
            Console.Write("Creating database...");
            var unitOfWork = new EfUnitOfWork();
            unitOfWork.InitializeRepository<Domain.Models.Restaurant>();
            var attendantService = new ConsoleAttendantService(unitOfWork);
            Console.Clear();
            Console.WriteLine("Hello. Welcome!");
            Console.WriteLine("Please type in your period of the day and order.");
            Console.WriteLine("If you want to get out type exit.");

            while (true)
            {
                var line = Console.ReadLine();
                if (line == "exit")
                {
                    break;
                }
                else
                {
                    Console.WriteLine(attendantService.GetOrder(line));
                }
            }
        }