예제 #1
0
        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));
            }
        }
예제 #2
0
 public void Delete(int id)
 {
     _spellRepository.Delete(id);
 }