/// <summary> /// Adds a single game to the catalogue. /// </summary> /// <param name="game"></param> public void Add(Game game) { if (!Games.Contains(game)){ Games.Add(game); //OnPropertyChanged("Games"); // Unnecessary => ObservableCollection implements the INotifyCollectionChanged interface! } }
/// <summary> /// Constructs a game viewmodel. /// </summary> /// <param name="model"></param> public GameViewModel(Game model) { Model = model; }