Esempio n. 1
0
        void DeleteMovieGenre()
        {
            Console.WriteLine("Enter MovieId = ");
            int        id = Convert.ToInt32(Console.ReadLine());
            MovieGenre mg = mgService.GetById(id);

            if (mgService.DeleteMovieGenre(id) > 0)
            {
                Console.WriteLine($"MovieGenre MovieId: {id} deleted");
            }
            else
            {
                Console.WriteLine("Some error occurred");
            }
        }
        void DeleteMovieGenre()
        {
            Console.Write("Enter Movie Id = ");
            int        id = Convert.ToInt32(Console.ReadLine());
            MovieGenre mg = movieGenreService.GetById(id);

            if (movieGenreService.DeleteMovieGenre(mg.MovieId) > 0)
            {
                Console.WriteLine($"MovieGenre {mg.MovieId} deleted successfully");
            }
            else
            {
                Console.WriteLine("Some error has occurred");
            }
        }