protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterRoutes(RouteTable.Routes);

            ILibraryClass library = new LibraryClass(new Repository(new MSSQLRepositoryFactory()));

            ControllerBuilder.Current.SetControllerFactory(new MVCLibraryControllerFactory(library));
        }
        public LibraryClassTest()
        {
            repository = new Repository(new MSSQLRepositoryFactory());

            reader = new Reader("First Reader", "Brest");
            repository.ReaderRepository.Save(reader);
            department = new LibraryDepartment("Abonement", true);
            repository.LibraryDepartmentRepository.Save(department);
            librarian = new Librarian("First Librarian ", department);
            repository.LibrarianRepository.Save(librarian);
            book = new Book("First Author", "Title", 2002, department);
            repository.BookRepository.Save(book);
            book2 = new Book("Second Author", "Title", 2000, department);
            repository.BookRepository.Save(book2);

            library = new LibraryClass(repository);
        }