Exemple #1
0
        public ActionResult Vote(string customerId)
        {
            WantedUser wantedUser = _wantedUserManagementService.GetWantedUserByCustomerId(customerId);

            wantedUser.TotalVotes += 1;
            _wantedUserManagementService.Update(wantedUser);

            CurrentUser.HasVoted = true;
            _customerManagementService.Update(CurrentUser);

            return(RedirectToAction("Index", "ThankYou", new { customerId = CurrentUser.Id }));
        }