public ActionResult RemoveMenuType(long?Id) { if (Id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Dao.DeleteType(Id); return(RedirectToAction("MenuType", "Menus")); }