Пример #1
0
 public void SupportGoal(int id)
 {
     supportService.CreateSupport(new Support()
     {
         UserId = User.Identity.GetUserId(), GoalId = id, SupportedDate = DateTime.Now
     });
 }
        public ActionResult AddSupportToGoal()
        {
            Guid goalIdToken = (Guid)TempData["goToken"];
            var  goalId      = securityTokenService.GetActualId(goalIdToken);

            supportService.CreateSupport(new Support()
            {
                UserId = User.Identity.GetUserId(), GoalId = goalId, SupportedDate = DateTime.Now
            });
            securityTokenService.DeleteSecurityToken(goalIdToken);
            SocialGoalSessionFacade.Remove(SocialGoalSessionFacade.JoinGroupOrGoal);
            return(RedirectToAction("Index", "Home"));
        }