public IActionResult Delete(string id) { var aluno = _alunosService.Get(id); if (aluno == null) { return(NotFound()); } _alunosService.Remove(aluno.Id); return(NoContent()); }
public IActionResult Delete(int id) { _alunoService.Remove(id); return(RedirectToAction(nameof(Index))); }