8 instantiations of ForeignKeyConstraint
System.Data.Common (8)
System\Data\ConstraintCollection.cs (3)
182ForeignKeyConstraint constraint = new ForeignKeyConstraint(name, primaryKeyColumn, foreignKeyColumn); 193ForeignKeyConstraint constraint = new ForeignKeyConstraint(name, primaryKeyColumns, foreignKeyColumns); 814ForeignKeyConstraint newConstraint = new ForeignKeyConstraint(constr._constraintName, parents, childs);
System\Data\DataRelationCollection.cs (1)
811relation.ChildTable.Constraints.Add(foreignKey = new ForeignKeyConstraint(relation.ParentColumnsReference, relation.ChildColumnsReference));
System\Data\DataTable.cs (1)
650ForeignKeyConstraint fk = new ForeignKeyConstraint(constraintName, parentkeyColumns, childkeyColumns);
System\Data\ForeignKeyConstraint.cs (2)
742ForeignKeyConstraint clone = new ForeignKeyConstraint(ConstraintName, relatedColumns, columns); 782ForeignKeyConstraint clone = new ForeignKeyConstraint(ConstraintName, relatedColumns, columns);
System\Data\XMLSchema.cs (1)
1322fkc = new ForeignKeyConstraint(name, pKey, fKey);
94 references to ForeignKeyConstraint
netstandard (1)
netstandard.cs (1)
532[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.ForeignKeyConstraint))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
98[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.ForeignKeyConstraint))]
System.Data.Common (92)
System\Data\ConstraintCollection.cs (16)
116else if (constraint is ForeignKeyConstraint fk) 132AddForeignKeyConstraint((ForeignKeyConstraint)constraint); 175/// Constructs a new <see cref='System.Data.ForeignKeyConstraint'/> 182ForeignKeyConstraint constraint = new ForeignKeyConstraint(name, primaryKeyColumn, foreignKeyColumn); 188/// Constructs a new <see cref='System.Data.ForeignKeyConstraint'/> with the specified parent columns and 193ForeignKeyConstraint constraint = new ForeignKeyConstraint(name, primaryKeyColumns, foreignKeyColumns); 240private void AddForeignKeyConstraint(ForeignKeyConstraint constraint) 251ForeignKeyConstraint? fk = (constraint as ForeignKeyConstraint); 394else if (constraint is ForeignKeyConstraint) 548internal ForeignKeyConstraint? FindForeignKeyConstraint(DataColumn[] parentColumns, DataColumn[] childColumns) 553ForeignKeyConstraint? constraint = (List[i] as ForeignKeyConstraint); 788ForeignKeyConstraint constr = (ForeignKeyConstraint)_delayLoadingConstraints[i]; 814ForeignKeyConstraint newConstraint = new ForeignKeyConstraint(constr._constraintName, parents, childs);
System\Data\ConstraintConverter.cs (3)
48ForeignKeyConstraint constr = (ForeignKeyConstraint)value; 50typeof(ForeignKeyConstraint).GetConstructor(new Type[] { typeof(string), typeof(string), typeof(string[]),
System\Data\ConstraintEnumerator.cs (7)
73protected override bool IsValidCandidate(Constraint constraint) => constraint is ForeignKeyConstraint; 75public ForeignKeyConstraint GetForeignKeyConstraint() 79return (ForeignKeyConstraint)CurrentObject; 94((constraint is ForeignKeyConstraint) && (((ForeignKeyConstraint)constraint).Table == _table)); 108((constraint is ForeignKeyConstraint) && (((ForeignKeyConstraint)constraint).RelatedTable == _table));
System\Data\DataColumnCollection.cs (1)
525if (((ForeignKeyConstraint)constraint).ParentKey.ContainsColumn(column))
System\Data\DataException.cs (2)
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));
System\Data\DataRelation.cs (6)
47private ForeignKeyConstraint? _childKeyConstraint; 486ForeignKeyConstraint? constraint = ChildTable.Constraints.FindForeignKeyConstraint(ChildKey.ColumnsReference, ParentKey.ColumnsReference); 601/// Gets the <see cref='System.Data.ForeignKeyConstraint'/> for the relation. 603public virtual ForeignKeyConstraint? ChildKeyConstraint 624internal void SetChildKeyConstraint(ForeignKeyConstraint? value) 793if (cs is ForeignKeyConstraint fk)
System\Data\DataRelationCollection.cs (1)
806ForeignKeyConstraint? foreignKey = relation.ChildTable.Constraints.FindForeignKeyConstraint(relation.ParentColumnsReference, relation.ChildColumnsReference);
System\Data\DataSet.cs (9)
1190ForeignKeyConstraint foreign = (ForeignKeyConstraint)constraints[j]; 3296if (cons[j] is ForeignKeyConstraint) 3332ForeignKeyConstraint? constraint; 3339if (constraints[j] is ForeignKeyConstraint) 3341constraint = (ForeignKeyConstraint)constraints[j]; 3372ForeignKeyConstraint? constraint; 3379if (constraints[j] is ForeignKeyConstraint) 3381constraint = (ForeignKeyConstraint)constraints[j];
System\Data\DataTable.cs (14)
553ForeignKeyConstraint? fk = c as ForeignKeyConstraint; 650ForeignKeyConstraint fk = new ForeignKeyConstraint(constraintName, parentkeyColumns, childkeyColumns); 2456ForeignKeyConstraint? foreign = Constraints[j] as ForeignKeyConstraint; 2462if (foreign.Clone(clone) is ForeignKeyConstraint clonedConstraint && 2488ForeignKeyConstraint? foreign = Constraints[j] as ForeignKeyConstraint; 2493foreign.Clone(clone) is ForeignKeyConstraint newforeign) 2859ForeignKeyConstraint constraint = constraints.GetForeignKeyConstraint(); 6602ForeignKeyConstraint? fkc = tempConstrain as ForeignKeyConstraint; // we have already cloned the UKC when cloning the datatable 6609ForeignKeyConstraint newFKC = (ForeignKeyConstraint)fkc.Clone(destinationTable.DataSet!)!;
System\Data\DataTableCollection.cs (2)
416ForeignKeyConstraint constraint = constraints.GetForeignKeyConstraint(); 433ForeignKeyConstraint constraint = constraints.GetForeignKeyConstraint();
System\Data\ForeignKeyConstraint.cs (11)
39/// Initializes a new instance of the <see cref='System.Data.ForeignKeyConstraint'/> class with the specified parent and 47/// Initializes a new instance of the <see cref='System.Data.ForeignKeyConstraint'/> class with the specified name, 58/// Initializes a new instance of the <see cref='System.Data.ForeignKeyConstraint'/> class with the specified arrays 66/// Initializes a new instance of the <see cref='System.Data.ForeignKeyConstraint'/> class with the specified name, 742ForeignKeyConstraint clone = new ForeignKeyConstraint(ConstraintName, relatedColumns, columns); 757internal ForeignKeyConstraint? Clone(DataTable destination) 782ForeignKeyConstraint clone = new ForeignKeyConstraint(ConstraintName, relatedColumns, columns); 855/// Gets a value indicating whether the current <see cref='System.Data.ForeignKeyConstraint'/> is identical to the specified object. 859if (!(key is ForeignKeyConstraint)) 863ForeignKeyConstraint key2 = (ForeignKeyConstraint)key;
System\Data\Rule.cs (1)
7/// Indicates the action that occurs when a <see cref='System.Data.ForeignKeyConstraint'/>
System\Data\UniqueConstraint.cs (1)
197ForeignKeyConstraint constraint = cs.GetForeignKeyConstraint();
System\Data\xmlsaver.cs (14)
100else if (type == typeof(ForeignKeyConstraint)) 290if (constr is ForeignKeyConstraint) 292if (!_tables.Contains(((ForeignKeyConstraint)constr).RelatedTable)) 441ForeignKeyConstraint? fk = (cs as ForeignKeyConstraint); 1684private static bool AutoGenerated(ForeignKeyConstraint fk) 1689internal static bool AutoGenerated(ForeignKeyConstraint fk, bool checkRelation) 2067else if (constraints[i] is ForeignKeyConstraint && genNested) 2069ForeignKeyConstraint foreign = (ForeignKeyConstraint)constraints[i]; 2148AddExtendedProperties(foreign._extendedProperties, constraint, typeof(ForeignKeyConstraint)); 2174if (foreign.AcceptRejectRule != ForeignKeyConstraint.AcceptRejectRule_Default) 2178if (foreign.UpdateRule != ForeignKeyConstraint.Rule_Default) 2181if (foreign.DeleteRule != ForeignKeyConstraint.Rule_Default)
System\Data\XMLSchema.cs (4)
337if (instance is ForeignKeyConstraint) 1261return ForeignKeyConstraint.AcceptRejectRule_Default; 1275return ForeignKeyConstraint.Rule_Default; 1309ForeignKeyConstraint? fkc = null;