public Entities.Models.Hub.Messages.VoteToKickResult VoteToKick(Entities.Models.Hub.Messages.VoteToKick message)
{
Entities.GamePlayerKickVote vote = new Entities.GamePlayerKickVote();
vote.GameID = message.GameID;
vote.KickUserId = message.KickUserId;
vote.VotedUserId = Authentication.Security.CurrentUserId;
vote.Vote = message.Kick;
AS.GamePlayerKickVote.Base.IInsert _insert = BusinessLogic.UnityConfig.Container.Resolve<AS.GamePlayerKickVote.Base.IInsert>();
Entities.ActionResponses.VoteToKick response = _insert.Execute(vote);
return new Entities.Models.Hub.Messages.VoteToKickResult
{
Content = String.Format("Votes To Kick: {0} <br/> Votes To Stay: {1}",
response.VotesToKick,
response.VotesToStay),
Title = String.Format("Voted to {0} {1}.", (message.Kick ? "kick" : "keep"), response.KickUser.DisplayName),
AllVotesCasted = response.AllVotesCasted
};
}