Esempio n. 1
0
        /// <summary>
        /// Returns a collection of users who answered a question correctly.
        /// </summary>
        /// <param name="questionId"></param>
        /// <returns></returns>
        private async Task <IReadOnlyCollection <UserAnsweredQuestionCorrectlyViewModel> > GetUsersAnsweredCorrectlyAsync(int questionId)
        {
            var usersAnsweredCorrectly = await TriviaService.GetUsersAnsweredCorrectlyAsync(questionId);

            return(Mapper.Map <IReadOnlyCollection <AnsweredQuestion>, IReadOnlyCollection <UserAnsweredQuestionCorrectlyViewModel> >(usersAnsweredCorrectly));
        }