Esempio n. 1
0
        public async Task <IActionResult> GetAnswers(int id, [FromQuery] AnswerParams answerParams)
        {
            int pageSize  = answerParams.PageSize;
            int pageIndex = answerParams.PageIndex;

            var answersFromRepo = await _repo.GetAnswersAsync(id, answerParams);

            var answers = _mapper.Map <IEnumerable <Answer> >(answersFromRepo);

            return(Ok(new { answers, answerParams.Length }));
        }