public ActionResult Delete(int?id) { bool isDeleted = _Manager.Delete(id); message = "This Item Delted Successfully!!"; return(new JsonResult { Data = new { status = isDeleted, message = message } }); }
public ActionResult Delete(GeneralCategory generalCategory) { bool isSaved = generalCategoryManager.Delete(generalCategory); if (isSaved) { ViewBag.Message = "Deleted Successfully!"; } return(RedirectToAction("Create")); }