示例#1
0
        public IActionResult GetRooms(Guid roomsid)
        {
            var rooms = _rooms.GetRooms(roomsid);

            if (rooms != null)
            {
                return(Ok(rooms));
            }
            return(NotFound($"Rooms with id: {roomsid} was not found"));
        }
示例#2
0
        // GET: Rooms
        public async Task <IActionResult> Index()
        {
            List <Rooms> rooms = await _rooms.GetRooms();

            return(View(rooms));
        }