Пример #1
0
        public async Task <ActionResult> Update([FromBody] CinemaHall data)
        {
            if (await cinemaHallLogic.FindByIdAsync(data.CinemaHallId) == null)
            {
                return(NotFound());
            }

            if (await cinemaHallLogic.UpdateAsync(data))
            {
                return(NoContent());
            }

            return(BadRequest("Could not update the sent resource!"));
        }
Пример #2
0
        public async Task FindByIdAsyncTest(bool success, int id)
        {
            var cinemaHall = await cinemaHallLogic.FindByIdAsync(id);

            if (success)
            {
                Assert.NotNull(cinemaHall);
            }
            else
            {
                Assert.Null(cinemaHall);
            }
        }