public async Task Vote(string vote) { var currentQuestion = await _votingRepository.GetCurrentQuestion(); await _votingRepository.Vote(currentQuestion, CurrentUserName, vote); await _unitOfWork.SaveChangesAsync(); Clients.All.userVoted(CurrentUserName); }
public bool Vote() { return(_votingRepository.Vote()); }
public IActionResult Index(int awesomeness) { _votingRepository.Vote(awesomeness); return(new RedirectToActionResult("Results", "Home", null)); }