public void Save() { GameXmlDataServices gameXmlDataService = new GameXmlDataServices(); using (gameXmlDataService) { gameXmlDataService.Write(_games); } }
public GameRepository() { GameXmlDataServices gameXmlDataService = new GameXmlDataServices(); using (gameXmlDataService) { _games = gameXmlDataService.Read() as List <Game>; } }