Exemplo n.º 1
0
        public ConsoleResult Run(string[] args)
        {
            if (args.Length == 1)
            {
                ToDoListService.ToDoListService toDoListService = new ToDoListService.ToDoListService();

                var result = toDoListService.DeleteCompletedToDoItems();

                if (result)
                {
                    return(new ConsoleResult("To do list items completed deleted successfully."));
                }
                else
                {
                    return(new ConsoleResult("Error in deleting to do list completed items. No items deleted."));
                }
            }
            return(new ConsoleErrorResult("Command doesn't require parameters.  Enter without parameters."));
        }
 public JsonResult DeleteCompletedToDoItems()
 {
     return(Json(_toDoListService.DeleteCompletedToDoItems()));
 }