Beispiel #1
0
 public CreateScreen(DatabaseFixture fixture)
 {
     _fixture = fixture;
     _model   = new CreateScreenBindingModel
     {
         Name        = "Tendeñera",
         Rows        = 2,
         SeatsPerRow = 2
     };
 }
Beispiel #2
0
        public async Task <IHttpActionResult> CreateScreen(
            int cinemaId,
            CreateScreenBindingModel model)
        {
            var response = await _mediator.Send(new CreateScreenCommand(
                                                    cinemaId : cinemaId,
                                                    screenName : model.Name,
                                                    screenRows : model.Rows,
                                                    screenSeatsPerRow : model.SeatsPerRow));

            var url = Url.Route("GetScreen", new
            {
                CinemaId = cinemaId,
                ScreenId = response.Screen.Id
            });

            return(Created(url, response.Screen));
        }