Exemplo n.º 1
0
        public async Task <IActionResult> UpdateJustGame([FromBody] JustGameModel gameModel)
        {
            manager.UpdateJustGame(gameModel);

            var games = manager.GetGamesJoined();

            return(Ok(games));
        }
Exemplo n.º 2
0
        public void UpdateJustGame(JustGameModel model)
        {
            var game = repository.GetGameById(model.Id);

            game.Name        = model.Name;
            game.ReleaseDate = model.ReleaseDate;
            game.Review      = model.Review;
            game.Price       = model.Price;

            repository.Update(game);
        }