Пример #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);
 }