public ActionResult Create(LinkCategory category)
 {
     if (ModelState.IsValid)
     {
         db.LinkCategories.Add(category);
         db.SaveChanges();
         if (Request.IsAjaxRequest())
             return Content(null);
         return RedirectToAction("Index");
     }
     if (Request.IsAjaxRequest())
         return PartialView(category);
     return View(category);
 }
 public ActionResult Edit(LinkCategory category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(category).State = EntityState.Modified;
         db.SaveChanges();
         if (Request.IsAjaxRequest())
             return Content(null);
         return RedirectToAction("Index");
     }
     if (Request.IsAjaxRequest())
         return PartialView(category);
     return View(category);
 }