Exemplo n.º 1
0
        public static bool LogsMenu()
        {
            Console.WriteLine("<<Trading Company>>");
            Console.WriteLine("CRUD operation");
            Console.WriteLine("Logs");
            Console.WriteLine("Select an operation: ");
            Console.WriteLine("<1>Read");
            Console.WriteLine("<2>Exit");
            Console.Write("\r\nSelect an option: ");
            LogsService categoryService = new LogsService(mapper);

            switch (Console.ReadLine())
            {
            case "1":
                Console.Clear();
                Console.WriteLine("All Logs :");
                IEnumerable <LogsDTO> category         = categoryService.GetAllLogs();
                Extensions            productExtension = new Extensions();
                foreach (var u in category)
                {
                    Console.WriteLine(productExtension.ToString(u));
                }
                return(true);



            case "2":
                Console.Clear();
                return(false);
            }
            Console.Clear();
            return(false);
        }