67 references to ReferentialConstraints
System.Data.Entity (45)
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (1)
156
var fkConstraint = relSet.ElementType.
ReferentialConstraints
[0];
System\Data\Common\Utils\MetadataHelper.cs (1)
514
foreach (ReferentialConstraint constraint in assocType.
ReferentialConstraints
)
System\Data\Mapping\BaseMetadataMappingVisitor.cs (1)
128
foreach (var item in associationType.
ReferentialConstraints
)
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (2)
289
Debug.Assert(aSet.ElementType.
ReferentialConstraints
.Count == 1, "aSet.ElementType.ReferentialConstraints.Count == 1");
290
ReferentialConstraint rc = aSet.ElementType.
ReferentialConstraints
.Single();
System\Data\Mapping\StorageMappingItemLoader.cs (4)
1424
ReferentialConstraint constraint = associationSet.ElementType.
ReferentialConstraints
.Single();
1426
if (associationSet.ElementType.
ReferentialConstraints
.Single().ToProperties.All(p => dependentKeys.Contains(p)))
4070
ReferentialConstraint constraint = associationSet.ElementType.
ReferentialConstraints
.Single();
4313
ReferentialConstraint constraint = associationType.
ReferentialConstraints
.Single();
System\Data\Mapping\StorageModificationFunctionMapping.cs (1)
210
ReadOnlyMetadataCollection<ReferentialConstraint> constraints = assocationSet.ElementType.
ReferentialConstraints
;
System\Data\Mapping\Update\Internal\AssociationSetMetadata.cs (1)
93
foreach (ReferentialConstraint constraint in associationSet.ElementType.
ReferentialConstraints
)
System\Data\Mapping\Update\Internal\UpdateCommandOrderer.cs (1)
109
foreach (ReferentialConstraint constraint in associationType.
ReferentialConstraints
)
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (2)
171
if (0 < associationSet.ElementType.
ReferentialConstraints
.Count)
175
foreach (ReferentialConstraint constraint in associationSet.ElementType.
ReferentialConstraints
)
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (2)
104
foreach (ReferentialConstraint constraint in assocType.
ReferentialConstraints
)
132
foreach (ReferentialConstraint constraint in assocType.
ReferentialConstraints
)
System\Data\Mapping\ViewGeneration\Structures\MemberPath.cs (1)
716
foreach (ReferentialConstraint constraint in assocType.
ReferentialConstraints
)
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (2)
113
foreach (ReferentialConstraint constraint in relationType.
ReferentialConstraints
)
378
ReferentialConstraint refConstraint = association.
ReferentialConstraints
.FirstOrDefault();
System\Data\Metadata\Converter.cs (1)
501
Debug.Assert(associationType.
ReferentialConstraints
.Count == 0, "This must never have been initialized");
System\Data\Metadata\Edm\AssociationType.cs (2)
122
this.
ReferentialConstraints
.Source.SetReadOnly();
132
this.
ReferentialConstraints
.Source.Add(referentialConstraint);
System\Data\Metadata\Edm\EntitySet.cs (2)
141
Debug.Assert(associationSet.ElementType.
ReferentialConstraints
.Count == 1, "Expected exactly one constraint for FK");
142
ReferentialConstraint constraint = associationSet.ElementType.
ReferentialConstraints
[0];
System\Data\Metadata\Edm\NavigationProperty.cs (3)
144
associationType.
ReferentialConstraints
!= null,
147
if (associationType.
ReferentialConstraints
.Count > 0)
149
ReferentialConstraint rc = associationType.
ReferentialConstraints
[0];
System\Data\Objects\DataClasses\EntityReference.cs (3)
466
ReferentialConstraint constraint = ((AssociationType)this.RelationMetadata).
ReferentialConstraints
[0];
571
ReferentialConstraint constraint = ((AssociationType)this.RelationMetadata).
ReferentialConstraints
[0];
637
ReferentialConstraint constraint = ((AssociationType)RelationMetadata).
ReferentialConstraints
.Single();
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (1)
606
foreach (ReferentialConstraint constraint in ((AssociationType)this.RelationMetadata).
ReferentialConstraints
)
System\Data\Objects\DataClasses\RelatedEnd.cs (6)
417
var fkConstraint = associationMetadata.
ReferentialConstraints
[0];
861
ReferentialConstraint constraint = ((AssociationType)RelationMetadata).
ReferentialConstraints
.FirstOrDefault();
1488
foreach (ReferentialConstraint constraint in ((AssociationType)this.RelationMetadata).
ReferentialConstraints
)
1523
foreach (ReferentialConstraint constraint in ((AssociationType)_relationMetadata).
ReferentialConstraints
)
1695
ReferentialConstraint constraint = ((AssociationType)RelationMetadata).
ReferentialConstraints
[0];
1805
foreach (ReferentialConstraint constraint in ((AssociationType)this.RelationMetadata).
ReferentialConstraints
)
System\Data\Objects\DataClasses\RelationshipManager.cs (1)
1462
foreach (ReferentialConstraint constraint in association.ElementType.
ReferentialConstraints
)
System\Data\Objects\EntityEntry.cs (3)
2212
var constraint = ((AssociationType)relatedEnd.RelationMetadata).
ReferentialConstraints
[0];
2728
foreach (ReferentialConstraint constraint in association.ElementType.
ReferentialConstraints
)
2801
foreach (ReferentialConstraint constraint in association.ElementType.
ReferentialConstraints
)
System\Data\Objects\Internal\ForeignKeyFactory.cs (1)
80
ReferentialConstraint constraint = ((AssociationType)relatedEnd.RelationMetadata).
ReferentialConstraints
.First();
System\Data\Objects\ObjectStateManager.cs (1)
3264
foreach (ReferentialConstraint constraint in ((AssociationType)reference.RelationMetadata).
ReferentialConstraints
)
System\Data\Query\PlanCompiler\ConstraintManager.cs (1)
256
foreach (md.ReferentialConstraint constraint in assocType.
ReferentialConstraints
)
System\Data\SqlClient\SqlProviderUtilities.cs (1)
196
var constraint = associationSet.ElementType.
ReferentialConstraints
.Single();
System.Data.Entity.Design (18)
System\Data\Entity\Design\Common\MetadataItemSerializer.cs (1)
276
foreach (ReferentialConstraint constraint in associationType.
ReferentialConstraints
)
System\Data\Entity\Design\Common\OneToOneMappingSerializer.cs (7)
138
Debug.Assert(set.ElementType.
ReferentialConstraints
.Count == 1, "no referenctial constraint for association[0]");
139
ReferentialConstraint constraint = set.ElementType.
ReferentialConstraints
[0];
238
Debug.Assert(_storeAssociationSets[0].ElementType.
ReferentialConstraints
.Count == 1, "no referenctial constraint for association[0]");
239
Debug.Assert(_storeAssociationSets[1].ElementType.
ReferentialConstraints
.Count == 1, "no referenctial constraint for association[1]");
240
constraint0 = _storeAssociationSets[0].ElementType.
ReferentialConstraints
[0];
241
constraint1 = _storeAssociationSets[1].ElementType.
ReferentialConstraints
[0];
422
foreach (ReferentialConstraint rc in set.ElementType.
ReferentialConstraints
)
System\Data\Entity\Design\EntityModelSchemaGenerator.cs (7)
942
if (storeAssociation.
ReferentialConstraints
.Count == 0)
947
ReferentialConstraint storeConstraint = storeAssociation.
ReferentialConstraints
[0];
976
Debug.Assert(storeAssociation.
ReferentialConstraints
.Count <= 1, "We don't have a reason to have more than one constraint yet");
979
if (storeAssociation.
ReferentialConstraints
.Count == 0)
984
ReferentialConstraint storeConstraint = storeAssociation.
ReferentialConstraints
[0];
1022
if (storeAssociation.
ReferentialConstraints
.Count == 0)
1027
ReferentialConstraint storeConstraint = storeAssociation.
ReferentialConstraints
[0];
System\Data\Entity\Design\EntityStoreSchemaGenerator.cs (3)
853
foreach (var toPropertyOfAddedAssociation in session.AssociationTypes.SelectMany(t => t.
ReferentialConstraints
.SelectMany(refconst => refconst.ToProperties)))
855
foreach (var toProperty in type.
ReferentialConstraints
.SelectMany(refconst => refconst.ToProperties))
1052
ReferentialConstraint constraint = association.
ReferentialConstraints
[0];
System.Data.Services (1)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (1)
1933
foreach (ReferentialConstraint referentialConstraint in associationType.
ReferentialConstraints
)
System.Web.DynamicData (1)
DynamicData\ModelProviders\EFAssociationProvider.cs (1)
112
ReferentialConstraint constraint = relationshipType.
ReferentialConstraints
.FirstOrDefault(c => c.ToRole == navigationProperty.ToEndMember);
System.Web.Entity (2)
System\Data\WebControls\EntityDataSourceUtil.cs (2)
789
if (null != associationType.
ReferentialConstraints
)
791
foreach (ReferentialConstraint candidate in associationType.
ReferentialConstraints
)