예제 #1
0
        // GET: Rooms
        public async Task <IActionResult> Index()
        {
            var rooms = await _rooms.GetAllAsync();

            var isAjax = Request.Headers["X-Requested-With"] == "XMLHttpRequest";

            if (isAjax)
            {
                return(PartialView("_Table", rooms));
            }
            return(View(rooms));
        }