コード例 #1
0
        public void Add(GameResultDto gameResultDto)
        {
            var gameResult = mapper.Map <GameResult>(gameResultDto);

            gameResultService.Add(gameResult);
            applicationServiceLeaderboard.AddLeaderboard(gameResult.PlayerId, gameResult.Win);
        }
コード例 #2
0
        public IActionResult Post(
            [FromBody] TheGameResult model)
        {
            var player = new ThePlayerResult();

            player.PlayerID = model.PlayerID;
            player.TotalWin = model.Win;

            gameService.Add(model);
            playerService.validaInserir(player);
            return(StatusCode(201));
        }