public ActionResult Delete(int id, SpellViewModel viewModel) { bool success = _spellRepo.Delete(id); if (success) { return(RedirectToAction("Index", "Spell")); } else { ModelState.AddModelError("", "Unable to delete Spell"); return(View(viewModel)); } }
public void Delete(int id) { _spellRepository.Delete(id); }