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