public async Task <IActionResult> GetQuestions([FromQuery] QuestionParams questionParams) { int pageSize = questionParams.PageSize; int pageIndex = questionParams.PageIndex; var questionsFromRepo = await _repo.GetQuestionsAsync(questionParams); var questions = _mapper.Map <IEnumerable <QuestionToReturnDto> >(questionsFromRepo); return(Ok(new { questions, questionParams.Length })); }