Rename ConsoleAppMain class to Program. This class should contain only the main loop which will read and react to commands.
Program is a standard class name for the main entry point of the application, the same way as Main() is a standard method name for the entry point.
Create a new folder - Services. Inside, create another class TodoService which will be used to do the CRUD operations. This class will contain the methods for these operations.
This way we will separate the different responsibilities - one class will read and react on user commands, the other will do the actual work with the Todos.
Rename
ConsoleAppMain
class toProgram
. This class should contain only the main loop which will read and react to commands.Program
is a standard class name for the main entry point of the application, the same way asMain()
is a standard method name for the entry point.Create a new folder -
Services
. Inside, create another classTodoService
which will be used to do the CRUD operations. This class will contain the methods for these operations.This way we will separate the different responsibilities - one class will read and react on user commands, the other will do the actual work with the Todos.
(CRUD = Create, Read, Update, Delete)