public IActionResult RoomDetails(int id) { Room room = _sqlRoomService.GetRoom(id); room.Seats = _sqlRoomService.SeatsForSingleRoom(room); return(View(room)); }
public void GetRoom_ShouldWork() { //Arrange Room room = new() { Name = "wwwe", Cinema = new Cinema(), Seats = new List <Seat>(), CinemaId = 1, MovieRoom = new List <MovieRoom>() }; //Act _dbContext.Room.Add(room); _dbContext.SaveChanges(); //Assert Room roomDb = _sqlRoomService.GetRoom(room.Id); Assert.IsNotNull(roomDb); Assert.AreEqual(room, roomDb); }