Example #1
0
        static void Main(string[] args)
        {
            UserRepo userRepo = new UserRepo();
            ArticleRepo articleRepo = new ArticleRepo();
            AuthorRepo authorRepo = new AuthorRepo();

            UserValidator userValidator = new UserValidator();
            ArticleValidator articleValidator = new ArticleValidator();
            AuthorValidator authorValidator = new AuthorValidator();

            userRepo.SetValidator(userValidator);
            articleRepo.SetValidator(articleValidator);
            authorRepo.SetValidator(authorValidator);

            Manager manager = new Manager(userRepo, authorRepo, articleRepo);

            ConsoleUI console = new ConsoleUI(manager);
            console.Run();
        }