public IActionResult Get(Guid id)
        {
            try {
                Turma turma = _turmaRepository.BuscarPorId(id);


                if (turma == null)
                {
                    return(NotFound());
                }


                return(Ok(turma));
            }
            catch (Exception ex) {
                return(BadRequest(ex.Message));
            }
        }
示例#2
0
 public Turma Get(int id)
 {
     return(_TurmaRepository.BuscarPorId(id));
 }