Esempio n. 1
0
        public ActionResult <Game> Edit(int id, [FromBody] Game editedGame)
        {
            Game updatedGame = _gr.EditGame(id, editedGame);

            if (updatedGame == null)
            {
                return(BadRequest("haters gonna hate"));
            }
            return(Ok(updatedGame));
        }
 internal Game EditGame(Game gameToUpdate)
 {
     return _repo.EditGame(gameToUpdate);
 }