Beispiel #1
0
        public ActionResult SearchAdminCreateIndex()
        {
            try
            {
                AzureSearch.CreateSearchIndex();
                TempData["Success"] = "Search index created.";
            }
            catch (Exception ex)
            {
                TempData["Error"] = ex.ToString().SubStringPlus(0, 100);
            }

            return(RedirectToAction("SearchAdmin", "Admin"));
        }
Beispiel #2
0
        public ActionResult SearchAdminCreateIndex()
        {
            string err = "";

            try
            {
                AzureSearch.CreateSearchIndex();
                TempData["Success"] = "Search index created.";
            }
            catch (Exception ex)
            {
                err = ex.ToString();
            }

            TempData["Error"] = err;
            return(RedirectToAction("SearchAdmin", "Admin"));
        }