Пример #1
0
        public async Task Vote(string vote)
        {
            var currentQuestion = await _votingRepository.GetCurrentQuestion();

            await _votingRepository.Vote(currentQuestion, CurrentUserName, vote);

            await _unitOfWork.SaveChangesAsync();

            Clients.All.userVoted(CurrentUserName);
        }
Пример #2
0
 public bool Vote()
 {
     return(_votingRepository.Vote());
 }
Пример #3
0
 public IActionResult Index(int awesomeness)
 {
     _votingRepository.Vote(awesomeness);
     return(new RedirectToActionResult("Results", "Home", null));
 }