public void SelectAllTest() { var repo = new ModifierTypeRepository(); var results = repo.SelectAll(); Assert.AreEqual(5, results.Count); }
public void DeleteTest() { var repo = new ModifierTypeRepository(); repo.Delete(2); var allSets = repo.SelectAll(); Assert.AreEqual(4, allSets.Count); }
public void InsertTest() { var repo = new ModifierTypeRepository(); var newModifierType = new ModifierType(); newModifierType.ModifierTypeName = "New"; repo.Insert(newModifierType); Assert.AreEqual(6, repo.SelectAll().Count); }
public ActionResult Edit(int id) { var cardSetRepo = new CardSetRepository(); var cardRepo = new CardRepository(); var modifierTypeRepo = new ModifierTypeRepository(); var model = new CardEditModel(cardRepo.SelectView(id), cardSetRepo.SelectAll(), modifierTypeRepo.SelectAll()); return(View(model)); }
public ActionResult Index() { var model = _repo.SelectAll(); return(View(model)); }