public IActionResult Delete(int id) { try { _repo.Excluir(id); return(Ok(_repo.SelecionarTudo())); } catch (System.Exception) { return(StatusCode(500)); } }
public IActionResult Delete(int id) { try { _repo.Excluir(id); List <TurmaAluno> turmasAlunos = _repo.SelecionarTudo(); return(Ok(_mapper.Map <IEnumerable <TurmaAlunoDto> >(turmasAlunos))); } catch (System.Exception) { return(StatusCode(500)); } }
public IEnumerable <TurmaAluno> Delete(int id) { _repo.Excluir(id); return(_repo.SelecionarTudo()); }