Ejemplo n.º 1
0
        // GET: Companies
        public async Task <IActionResult> Index()
        {
            var companies = await _companies.GetAllAsync();

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

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