private void initialUser(LibraryController controller) { /* Création d'un utilisateur initial */ UserDto userDto = new UserDto("admin", "KANE", "Harry", Role.librarian, null); controller.AddUser(userDto, "admin"); BookBasic book = new BookBasic("FR1", "Chartreuse"); controller.AddBook(book); BookBasic book1 = new BookBasic("FR2", "Code civil 2019 annoté. Édition limitée"); controller.AddBook(book1); BookBasic book2 = new BookBasic("OI1", "Shakespeare, Le Songe d’une nuit d’été"); controller.AddBook(book2); BookBasic book3 = new BookBasic("PO1", "L'Intelligence des plantes"); controller.AddBook(book3); BookBasic book4 = new BookBasic("FU1", "Passage des Ombres"); controller.AddBook(book4); BookBasic book5 = new BookBasic("TY8", "Les Lois naturelles de l'enfant"); controller.AddBook(book5); BookWithDvd book6 = new BookWithDvd("TR8", "Le capitalisme expliqué à ma petite-fille", 1); controller.AddBook(book6); BookWithDvd book7 = new BookWithDvd("PO1", "L'île des chasseurs d'oiseaux", 2); controller.AddBook(book7); }
public LibraryGraphicConsole() { controller = new LibraryController(); initialUser(controller); }