Пример #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"));
        }