public ActionResult Create(ModifierType newModifierType) { _repo.Insert(newModifierType); // TempData allows us to pass data to the next request TempData[TempDataMessageKey] = "Modifier Type Created!"; return(RedirectToAction("Index")); }
public void InsertTest() { var repo = new ModifierTypeRepository(); var newModifierType = new ModifierType(); newModifierType.ModifierTypeName = "New"; repo.Insert(newModifierType); Assert.AreEqual(6, repo.SelectAll().Count); }