public ActionResult Create(MenuModel model) { try { if (ModelState.IsValid) { setupService.AddMenu(model); TempData["Success"] = $"{model.Name} Menu Added !!"; return(RedirectToAction("Index")); } } catch (Exception ex) { TempData["Danger"] = $"Something went wrong {ex.Message}"; } model.ParentMenu = setupService.GetParenMenus(); return(View(@"~\Views\Setup\Menu\Add.cshtml", model)); }