Пример #1
0
 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()));
     }
 }
Пример #2
0
 public void Down(int id)
 {
     _vote.DownVote(id);
 }
Пример #3
0
 public void ShouldDownVoteTrack()
 {
     repos.DownVote(2);
     Assert.IsTrue(context.Object.Votes.Count(i => i.PlayHistoryId == 2 && !i.VoteValue) == 1);
 }