public async Task <GetTopicDetailsModel> Handle(GetTopicByIdQuery request, CancellationToken cancellationToken)
        {
            var topic = _topicsRepository.GetById(request.Id);

            if (topic == null)
            {
                throw new ArgumentException($"Topic with id {request.Id} doesn't exist");
            }

            var options          = _optionsRepository.GetOptionsForTopic(topic.Id).ToList();
            var pickOptionsModel = _mapper.Map <IEnumerable <PickOptionModel> >(options);
            var data             = new Dictionary <string, int>();

            foreach (var option in options)
            {
                var countOfVotes = _votesRepository.GetCountOfVotesForOption(option.Id);
                data.Add(option.Name, countOfVotes);
            }

            var hadUserVote     = _votesRepository.HadUserVote(topic.Id, request.UserId);
            var lastFiveVotes   = _votesRepository.LastFiveVotesForTopic(topic.Id).ToList();
            var userVotedModels = new List <UserVotedModel>();

            foreach (var vote in lastFiveVotes)
            {
                var user = await _userManager.FindByIdAsync(vote.UserId);

                userVotedModels.Add(new UserVotedModel
                {
                    Id       = user.Id,
                    Username = user.UserName,
                    VotedAt  = vote.CreatedAt
                });
            }
            var result = new GetTopicDetailsModel
            {
                Title            = topic.Title,
                Id               = topic.Id,
                SerializedData   = JsonConvert.SerializeObject(data),
                HadUserVote      = hadUserVote,
                PickOptionModels = pickOptionsModel,
                UsersVoted       = userVotedModels
            };

            return(result);
        }