public ActionResult FolderDelete(Guid Id) { if (reposetory.DeleteFolder(Id)) { if (!Request.IsAjaxRequest()) { return(RedirectToAction("Folders")); } } return(RedirectToAction("Folders")); }