コード例 #1
0
 public async Task <GetWinnerViewResult> Post([FromBody] PlayersViewModel request)
 {
     try
     {
         PokerService        ps     = (PokerService)this._pokerService;
         GetWinnerViewResult result = new GetWinnerViewResult()
         {
             IsSuccess = true,
             Winner    = await ps.GetWinner(request)
         };
         return(result);
     }
     catch (Exception ex)
     {
         return(Fail <GetWinnerViewResult>(ex));
     }
 }
コード例 #2
0
        public IActionResult GetWinner()
        {
            WinnerDTO winner = PokerService.GetWinner();

            return(Ok(winner));
        }