/// <summary> /// Add picked game to the database source. /// </summary> /// <param name="sender"></param> private void AddGame(object sender) { if (!(sender is IGameDetailsModel game)) { return; } GameSource.InsertGame(game); MessageBox.Show("Game Added"); EmptyOutFields(); //Close this window? }
/// <summary> /// Inserts new record into source database. /// </summary> /// <param name="name"></param> public void Insert(GameModel name) { _sqlConn.InsertGame(_mapper.Map <IGameDetailsModel>(name)); }