public ActionResult Delete(int id, CategoryModel model) { try { CategoryBAL _categoryBAL = new CategoryBAL(); QuestionsCategory Qcategory = _categoryBAL.GetCategoryById(id); Qcategory.Id = model.Id; Qcategory.Name = model.Name; Qcategory.UpdatedBy = "Admin"; Qcategory.UpdatedDate = DateTime.Now.ToUniversalTime(); _categoryBAL.DeleteQuestoinsCategory(Qcategory); return(RedirectToAction("Index")); } catch { return(View()); } }