public ActionResult RewardUser(IndexViewModel index) { User user = Repository.GetUserByID(index.User.UserID); Award award = Repository.GetAwardByID(index.AwardEdit.Id); if (user != null && award != null) { UserAward userAward = new UserAward { Users = user, Awards = award }; Repository.AddUserAward(userAward); Repository.Save(); } return(RedirectToAction("Award", new { user.UserID })); }