Пример #1
0
        public TheaterDTO AddTheater(TheaterDTO theaterDTO)
        {
            var theater = _mapper.Map <Theater>(theaterDTO);

            _theatersRepository.Insert(theater);
            _theatersRepository.Save();


            return(_mapper.Map <TheaterDTO>(theater));
        }
Пример #2
0
 public bool Insert(TheaterParam theaterParam)
 {
     if (theaterParam == null)
     {
         Console.WriteLine("Insert Name");
         Console.Read();
     }
     else
     {
         status = _theaterRepository.Insert(theaterParam);
         Console.WriteLine("Success");
     }
     return(status);
 }