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