public void Update(int GameId, Videogame editedGame) { Videogame gameToEdit = this.FindOneGame(GameId); gameToEdit.title = editedGame.title; gameToEdit.studio = editedGame.studio; gameToEdit.year = editedGame.year; gameToEdit.genre = editedGame.genre; gameToEdit.updatedAt = DateTime.Now; SaveChanges(); }
public void Create(Videogame game) { Games.Add(game); SaveChanges(); }