public IActionResult AddHouseRule(Category category) { if (ModelState.IsValid) { var HouseRule = new HouseRule { Name = category.Name, }; _db.AddHouseRules(HouseRule); return(RedirectToAction("Dashboard", "Admin")); } return(View("Views/Shared/AddNewHouseRulePartialView.cshtml", category)); }