public IActionResult Delete(int id) { var actor = _actorRepository.GetById(id); _actorRepository.Delete(actor); return(RedirectToAction("List")); }
public async Task <IActionResult> Delete(string id) { var model = await _actorRepo.GetActor(id); if (model == null) { return(NotFound()); } await _actorRepo.Delete(model); return(Ok()); }