Esempio n. 1
0
 private static void ListMovie()
 {
     ServiceReference1.MovieServiceLibraryClient client = new MovieServiceLibraryClient();
     foreach (var item in client.GetAllMovie())
     {
         Console.WriteLine(item.Name + " " + item.Releasedate);
     }
 }
Esempio n. 2
0
        private static void ListMovieById()
        {
            ServiceReference1.MovieServiceLibraryClient client = new MovieServiceLibraryClient();

            Console.WriteLine("Enter the Movie Id : ");
            int   id = Convert.ToInt32(Console.ReadLine());
            Movie m  = client.GetMovie(id);

            Console.WriteLine(m.Name + " " + m.Releasedate);
        }
Esempio n. 3
0
        private static void deleteMovie()
        {
            ServiceReference1.MovieServiceLibraryClient client = new MovieServiceLibraryClient();

            Console.WriteLine("Enter the Movie Id : ");
            int id = Convert.ToInt32(Console.ReadLine());

            client.RemoveMovie(id);
            Console.WriteLine(" Movie  removed !!");
        }
Esempio n. 4
0
        private static void AddMovie()
        {
            Console.WriteLine("Enter movie name :");
            string name = Console.ReadLine();

            Console.WriteLine("Enter realease date :");
            string rdate = Console.ReadLine();

            ServiceReference1.MovieServiceLibraryClient client = new MovieServiceLibraryClient();
            Movie mv = new Movie()
            {
                Name = name, Releasedate = rdate
            };

            client.AddMovie(mv);
        }