9 writes to ConstraintName
System.Data.Common (9)
System\Data\ConstraintCollection.cs (2)
124constraint.ConstraintName = AssignName(); 316constraint.ConstraintName = AssignName();
System\Data\DataRelationCollection.cs (1)
816foreignKey.ConstraintName = relation.RelationName;
System\Data\DataTable.cs (2)
2465oldConstraint.ConstraintName = Constraints[j].ConstraintName; 2474oldConstraint.ConstraintName = Constraints[j].ConstraintName;
System\Data\ForeignKeyConstraint.cs (1)
822ConstraintName = relationName;
System\Data\Merger.cs (1)
499dest.ConstraintName = string.Empty;
System\Data\UniqueConstraint.cs (1)
385ConstraintName = constraintName;
System\Data\XMLSchema.cs (1)
1355fkc.ConstraintName = name;
55 references to ConstraintName
System.Data.Common (55)
System\Data\Constraint.cs (4)
13[DefaultProperty(nameof(ConstraintName))] 62get { return string.IsNullOrEmpty(_schemaName) ? ConstraintName : _schemaName; } 103throw ExceptionBuilder.ConstraintViolation(ConstraintName); 138public override string ToString() => ConstraintName;
System\Data\ConstraintCollection.cs (11)
94throw ExceptionBuilder.DuplicateConstraint(matchedConstraint.ConstraintName); 123if (constraint.ConstraintName.Length == 0) 126RegisterName(constraint.ConstraintName); 315if (constraint.ConstraintName.Length == 0) 318RegisterName(constraint.ConstraintName); 381UnregisterName(constraint.ConstraintName); 482return (name == ((Constraint)List[index]!).ConstraintName); 629int result = NamesEqual(constraint.ConstraintName, constraintName, false, _table.Locale); 672if (NamesEqual(name, ((Constraint)List[i]!).ConstraintName, true, _table.Locale) != 0) 674throw ExceptionBuilder.DuplicateConstraintName(((Constraint)List[i]!).ConstraintName); 778Add(constr.ConstraintName, parents, true);
System\Data\ConstraintConverter.cs (2)
43return new InstanceDescriptor(ctor, new object[] { constr.ConstraintName, constr.ColumnNames, constr.IsPrimaryKey }); 54return new InstanceDescriptor(ctor, new object[] { constr.ConstraintName, constr.ParentKey.Table.TableName, constr.ParentColumnNames,
System\Data\DataColumnCollection.cs (2)
517throw ExceptionBuilder.CannotRemoveConstraint(_table.Constraints[i].ConstraintName, _table.Constraints[i].Table!.TableName); 529throw ExceptionBuilder.CannotRemoveConstraint(constraint.ConstraintName, constraint.Table!.TableName);
System\Data\DataException.cs (5)
460public static Exception NeededForForeignKeyConstraint(UniqueConstraint key, ForeignKeyConstraint fk) => _Argument(SR.Format(SR.DataConstraint_NeededForForeignKeyConstraint, key.ConstraintName, fk.ConstraintName)); 470public static Exception RemoveParentRow(ForeignKeyConstraint constraint) => _InvalidConstraint(SR.Format(SR.DataConstraint_RemoveParentRow, constraint.ConstraintName)); 494public static Exception ExpressionAndConstraint(DataColumn column, Constraint constraint) => _Argument(SR.Format(SR.DataColumn_ExpressionAndConstraint, column.ColumnName, constraint.ConstraintName)); 669public static Exception TableInConstraint(DataTable table, Constraint constraint) => _Argument(SR.Format(SR.DataTable_InConstraint, table.TableName, constraint.ConstraintName));
System\Data\DataTable.cs (6)
544list.Add(uc.ConstraintName); 575list.Add(fk.ConstraintName); 2465oldConstraint.ConstraintName = Constraints[j].ConstraintName; 2474oldConstraint.ConstraintName = Constraints[j].ConstraintName; 2486if (!clone.Constraints.Contains(Constraints[j].ConstraintName, true)) 6610if (!destinationTable.Constraints.Contains(newFKC.ConstraintName))
System\Data\ForeignKeyConstraint.cs (11)
15[DefaultProperty(nameof(ConstraintName))] 188string error = SR.Format(SR.DataConstraint_ForeignKeyViolation, ConstraintName, ExceptionBuilder.KeysToString(childValues)); 287throw ExceptionBuilder.FailedCascadeDelete(ConstraintName); 396throw ExceptionBuilder.FailedCascadeUpdate(ConstraintName); 429throw ExceptionBuilder.FailedCascadeUpdate(ConstraintName); 501throw ExceptionBuilder.FailedClearParentTable(table.TableName, ConstraintName, Table.TableName); 507Debug.Assert(Table?.DataSet != null, $"Relation {ConstraintName} isn't part of a DataSet, so this check shouldn't be happening."); 520Debug.Assert(Table?.DataSet != null, $"ForeignKeyConstraint {ConstraintName} isn't part of a DataSet, so this check shouldn't be happening."); 617throw ExceptionBuilder.ForeignKeyViolation(ConstraintName, childKeyValues); 742ForeignKeyConstraint clone = new ForeignKeyConstraint(ConstraintName, relatedColumns, columns); 782ForeignKeyConstraint clone = new ForeignKeyConstraint(ConstraintName, relatedColumns, columns);
System\Data\Merger.cs (2)
480SR.Format(SR.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName), 506SR.Format(SR.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName),
System\Data\UniqueConstraint.cs (2)
304UniqueConstraint clone = new UniqueConstraint(ConstraintName, columns); 329UniqueConstraint clone = new UniqueConstraint(ConstraintName, columns);
System\Data\xmlsaver.cs (9)
300string name = constr.ConstraintName; 307builder.Append(table.TableName).Append('_').Append(constr.ConstraintName); 1675if (!unique.ConstraintName.StartsWith("Constraint", StringComparison.Ordinal)) 1701if (rel.RelationName != fk.ConstraintName) 2017if (unique.ConstraintName != unique.SchemaName) 2018constraint.SetAttribute(Keywords.MSD_CONSTRAINTNAME, Keywords.MSDNS, unique.ConstraintName); 2150if (foreign.ConstraintName != foreign.SchemaName) 2151constraint.SetAttribute(Keywords.MSD_CONSTRAINTNAME, Keywords.MSDNS, foreign.ConstraintName); 2163if (foreign.ConstraintName != rel.RelationName)
System\Data\XMLSchema.cs (1)
1316if (fKey[0].Table!.Constraints[iExisting].ConstraintName != name)