public async Task <NotaAlunoPorBimestreResposta> Executar(NotaAlunoDto notaAlunoDto) { if (notaAlunoDto is null) { throw new NegocioException("Não existem informações de entrada para busca das notas do aluno."); } var query = new ObterNotasAlunoQuery(notaAlunoDto.AnoLetivo, notaAlunoDto.Bimestre, notaAlunoDto.CodigoUe, notaAlunoDto.CodigoTurma, notaAlunoDto.CodigoAluno); return(await mediator.Send(query)); }
public async Task <ObjectResult> ObterNotasAluno([FromQuery] NotaAlunoDto notaAlunoDto, [FromServices] IObterNotasAlunoUseCase obterNotasAlunoUseCase) { return(Ok(await obterNotasAlunoUseCase.Executar(notaAlunoDto))); }