Example #1
0
        public IActionResult Delete(int id)
        {
            try
            {
                _alunoTurmaRepository.Excluir(id);

                return(Ok(id));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Example #2
0
        public IActionResult Excluir(Guid id)

        {
            try
            {
                var alunoDaTurma = _repo.BuscarPorId(id);
                if (alunoDaTurma == null)
                {
                    return(NotFound());
                }

                _repo.Excluir(id);
                return(Ok(alunoDaTurma));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Example #3
0
 public void Delete(int id)
 {
     _AlunoTurmaRepository.Excluir(id);
 }