Ejemplo n.º 1
0
 void PrintAll()
 {
     try
     {
         IEnumerable <Cast> castCollection = castService.GetAllCast();
         if (castCollection != null)
         {
             foreach (Cast item in castCollection)
             {
                 Console.WriteLine(item.Id + " \t " + item.Name + " \t " + item.Gender);
             }
         }
         else
         {
             Console.WriteLine("No data");
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }