Exemple #1
0
        public async Task <IList <AlunoDto> > GetAluno()
        {
            var alunosRepository = await _alunoRepository.GetAll();

            var alunos = _mapper.Map <List <AlunoDto> >(alunosRepository);

            return(alunos);
        }
Exemple #2
0
        public IEnumerable <Aluno> GetAll(
            [FromServices] IAlunoRepository repository
            )
        {
            var user = User.Claims.FirstOrDefault(x => x.Type == "user_id")?.Value;

            return(repository.GetAll());
        }
 public IHttpActionResult GetAlunos()
 {
     try
     {
         return(Ok(_alunoRepository.GetAll()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Exemple #4
0
 public IEnumerable <Aluno> ObterAlunos()
 {
     return(repo.GetAll());
 }
Exemple #5
0
        public async Task <IEnumerable <GetAlunoQueryResponse> > Handle(GetAlunoQuery request, CancellationToken cancellationToken)
        {
            var results = await _alunoRepository.GetAll();

            return(_mapper.Map <IEnumerable <GetAlunoQueryResponse> >(results));
        }
Exemple #6
0
 public IEnumerable <AlunoViewModel> GetAll()
 {
     return(_alunoRepository.GetAll().ProjectTo <AlunoViewModel>(_mapper.ConfigurationProvider));
 }
 public IQueryable <Aluno> getAll()
 {
     return(_alunoRepository.GetAll());
 }
        public IEnumerable <Aluno> GetAll()
        {
            var result = _repository.GetAll();

            return(result ?? throw new Exception("Não foram encontrados alunos cadastrados."));
        }
 public IEnumerable <Aluno> GetAll()
 {
     return(_alunoRepository.GetAll());
 }
        public IActionResult GetList()
        {
            var list = _context.GetAll();

            return(Ok(list));
        }
Exemple #11
0
 public IList <AlunoDTO> GetAll()
 {
     return(_alunoRepository.GetAll()
            .Select(aluno => Mapper.Map <AlunoDTO>(aluno))
            .ToList());
 }