public async Task <IActionResult> ExcluirAluno(int id) { try { if (ModelState.IsValid) { await _alunoService.ExcluirAluno(id); return(Ok()); } else { return(BadRequest(ModelState)); } } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public bool Deletar(int id) { return(AlunoService.ExcluirAluno(id)); }