Exemplo n.º 1
0
        // GET: BookingRoom/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var bookingRoom = await _context.BookingRoom.FindAsync(id);

            if (bookingRoom == null)
            {
                return(NotFound());
            }
            ViewData["RoomId"] = new SelectList(_context.Set <Room>(), "RoomId", "RoomName", bookingRoom.RoomId);
            return(View(bookingRoom));
        }