Exemplo n.º 1
0
 private static void ListMovie()
 {
     ServiceReference1.MovieServiceLibraryClient client = new MovieServiceLibraryClient();
     foreach (var item in client.GetAllMovie())
     {
         Console.WriteLine(item.Name + " " + item.Releasedate);
     }
 }
Exemplo 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);
        }
Exemplo 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 !!");
        }
Exemplo 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);
        }