public ActionResult Create(mCatergory model) { try { if (ModelState.IsValid) { Message _message = DataAccess.AddUpdate(model.CategoryID, model.CategoryName, model.IsActive); return(RedirectToAction("Index")); } return(View(model)); // TODO: Add insert logic here } catch { return(View()); } }