public ActionResult AddUpVote(int PlayHistoryId) { using (var context = new Uow(this.context)) { var repos = new RepositoryVote(context); AuthHelper _ah = new AuthHelper(context); var _userId = _ah.SetupUser(); repos.UpVote(PlayHistoryId); Success("Vote", "Save successful."); return(Redirect(Request.UrlReferrer.ToString())); } }
public void Up(int id) { _vote.UpVote(id); }
public void ShouldUpVoteTrack() { repos.UpVote(2); Assert.IsTrue(context.Object.Votes.Count(i => i.PlayHistoryId == 2 && i.VoteValue) == 1); }