public ActionResult <Turma> GetTurma(Guid id) { var turma = _turmaRepository.BuscarPorId(id); if (turma == null) { return(NotFound()); } return(turma); }
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)); } }
public Turma Get(Guid id) { return(_turmaRepository.BuscarPorId(id)); }