Exemplo n.º 1
0
        public async Task <VotingRoom> VoteTo(BattleVoteCData voteCData)
        {
            var battle = await Mediator.Send(new GetById <Battle>(voteCData.BattleId));

            var votingRoom = new VotingRoom(battle, voteCData);
            await Mediator.Send(new UpdateVotes(votingRoom));

            return(votingRoom);
        }
Exemplo n.º 2
0
 public UpdateVotes(VotingRoom votingRoom)
 {
     VotingRoom = votingRoom;
 }
 public BattleVoteUpdateView(VotingRoom votingRoom)
 {
     TotalVotesNumber = votingRoom.BattleVotesNumber;
     IsLikedByUser    = votingRoom.IsVoted;
     VotesNumber      = votingRoom.SemifinalistVotesNumber;
 }