public void Delete(Addon record) { var row = this.GetRowByRowId(record.rowID, string.Empty); if (row == null) { row = this.dataSet.ttbladdon.NewttbladdonRow(); Addon.BuildMinimalRow(ref row, record); this.dataSet.ttbladdon.AddttbladdonRow((pdsaddonDataSet.ttbladdonRow)row); } row.Delete(); this.SaveChanges(); }