public IActionResult Get() { try { var turma = _turmaRepository.Listar(); if (turma.Count == 0) { return(NoContent()); } return(Ok(new { totalCount = turma.Count, data = turma })); } catch (Exception ex) { return(BadRequest(ex.Message)); } }