public void Add(GameResultDto gameResultDto) { var gameResult = mapper.Map <GameResult>(gameResultDto); gameResultService.Add(gameResult); applicationServiceLeaderboard.AddLeaderboard(gameResult.PlayerId, gameResult.Win); }
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)); }