示例#1
0
        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();
        }
示例#2
0
 public void Create(Videogame game)
 {
     Games.Add(game);
     SaveChanges();
 }