private async Task <PollVotingResultModel> GetOptionsAndVotesFromDatabaseAndAddToModel(int pollId, PollVotingResultModel pollResults) { var tempOptions = await _optionRepo.GetPollOptionsForDisplay(pollId); if (tempOptions != null) { pollResults = await AddOptionsAndVotesToModel(pollResults, tempOptions); } return(pollResults); }
public Task <List <PollOptionModel> > GetPollOptionsForDisplay(int pollId) { return(_optionRepo.GetPollOptionsForDisplay(pollId)); }