示例#1
0
        public IHttpActionResult Index(CinemaCreationModel model)
        {
            ICinema cinema = cinemaRepo.GetByNameAndAddress(model.Name, model.Address);

            if (cinema == null)
            {
                cinemaRepo.Insert(new Cinema(model.Name, model.Address));

                return(Ok());
            }

            return(BadRequest("Cinema already exists"));
        }
示例#2
0
 public bool Insert(CinemaParam cinemaParam)
 {
     _cinemaRepository.Insert(cinemaParam);
     return(status = true);
 }
 public void Add(Entities.Cinema item)
 {
     _cinemaRepository.Insert(item);
 }