Пример #1
0
        public ActionResult <Turma> GetTurma(Guid id)
        {
            var turma = _turmaRepository.BuscarPorId(id);

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

            return(turma);
        }
Пример #2
0
        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));
            }
        }
Пример #3
0
 public Turma Get(Guid id)
 {
     return(_turmaRepository.BuscarPorId(id));
 }