コード例 #1
0
        public bool DeleteTheater(int id)
        {
            var theaterToDelete = _theatersRepository.Get(id);

            if (theaterToDelete == null)
            {
                return(false);
            }
            _theatersRepository.Delete(theaterToDelete);
            _theatersRepository.Save();
            return(true);
        }
コード例 #2
0
 public bool Delete(int?Id)
 {
     if (Id == null)
     {
         Console.WriteLine("Insert Id");
         Console.Read();
     }
     else if (Id == ' ')
     {
         Console.WriteLine("Dont Insert Blank Caracter");
         Console.Read();
     }
     else
     {
         status = _theaterRepository.Delete(Id);
         Console.WriteLine("Success");
     }
     return(status);
 }