示例#1
0
        private static void CreateToDoList()
        {
            Console.WriteLine("Enter List Title:");
            string title = Console.ReadLine();

            bool created = _toDoListService.CreateToDolist(title, _userService.CurrentUser.Id);

            if (created)
            {
                Console.WriteLine($"ToDoList with title '{title}' added");
            }
            else
            {
                Console.WriteLine($"ToDoList with title '{title}' already exists");
            }
            Console.WriteLine();
        }
示例#2
0
        public void CreateToDoList()
        {
            _writer.WriteLine("Enter List Title:");
            string title = _reader.ReadLine();

            bool created = _toDoListService.CreateToDolist(_userService.CurrentUser.Id, title);

            if (created)
            {
                _writer.WriteLine($"ToDoList with title '{title}' added");
            }
            else
            {
                _writer.WriteLine($"ToDoList with title '{title}' already exists");
            }
            _writer.WriteLine("");
        }