예제 #1
0
        public static void CreateMovie()
        {
            StandardMessages.CreateMessage("a Movie");
            Movie movie = ItemDataCapture.Movie();

            MovieRepository.SaveMovieToDB(movie);
            StandardMessages.WasCreatedMessage("book");
        }
예제 #2
0
        public static void CreateBook()
        {
            StandardMessages.CreateMessage("a Book");
            Book book = ItemDataCapture.Book();

            BookRepository.SaveBookToDB(book);
            StandardMessages.WasCreatedMessage("book");
        }
예제 #3
0
        public static void UpdateMovie()
        {
            Movie movieToUpdate = SelectMovieById.SelectMovie("update");

            if (movieToUpdate != null)
            {
                Movie updatedMovie = ItemDataCapture.Movie();
                MovieRepository.UpdateMovie(movieToUpdate.Id, updatedMovie);
                StandardMessages.UpdatedMessage("movie");
            }
        }
예제 #4
0
        public static void UpdateBook()
        {
            Book bookToUpdate = SelectBookById.SelectBook("update");

            if (bookToUpdate != null)
            {
                Book updatedBook = ItemDataCapture.Book();
                BookRepository.UpdateBook(bookToUpdate.Id, updatedBook);
                StandardMessages.UpdatedMessage("book");
            }
        }