57 references to ToRole
System.Data.Entity (49)
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (2)
157var dependentSetEnd = relSet.AssociationSetEnds[fkConstraint.ToRole.Name]; 323DbRelatedEntityRef result = DbExpressionBuilder.CreateRelatedEntityRef(fkConstraint.ToRole, fkConstraint.FromRole, principalRef);
System\Data\Common\Utils\MetadataHelper.cs (2)
519if (thisEnd.Equals((AssociationEndMember)constraint.ToRole)) 527otherEndType = (EntityType)((RefType)((AssociationEndMember)constraint.ToRole).TypeUsage.EdmType).ElementType;
System\Data\Mapping\BaseMetadataMappingVisitor.cs (1)
177Visit(referentialConstraint.ToRole);
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (3)
292EntitySet dependentSet = aSet.AssociationSetEnds[rc.ToRole.Name].EntitySet; 298EntityType dependentType = MetadataHelper.GetEntityTypeForEnd((AssociationEndMember)rc.ToRole); 324if (end.Name == rc.ToRole.Name)
System\Data\Mapping\StorageMappingItemLoader.cs (2)
1425IEnumerable<EdmMember> dependentKeys = MetadataHelper.GetEntityTypeForEnd((AssociationEndMember)constraint.ToRole).KeyMembers; 4076if (fromEnd.CorrespondingAssociationEndMember == constraint.ToRole &&
System\Data\Mapping\StorageModificationFunctionMapping.cs (2)
215if ((assocationSet.AssociationSetEnds[constraint.ToRole.Name].EntitySet == entitySet) && 216(constraint.ToRole.GetEntityType().IsAssignableFrom(entityType)))
System\Data\Mapping\Update\Internal\UpdateCommandOrderer.cs (1)
113source = associationSet.AssociationSetEnds[constraint.ToRole.Name];
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (5)
179EntityKey dependentKey = (EntityKey)record[constraint.ToRole.Name]; 193int dependentOffset = GetKeyMemberOffset(constraint.ToRole, dependentPropertyEnum.Current, 231EntityType dependentType = MetadataHelper.GetEntityTypeForEnd((AssociationEndMember)constraint.ToRole); 287throw EntityUtil.Update(Strings.Update_AmbiguousForeignKey(constraint.ToRole.DeclaringType.FullName), null, stateEntry); 314int dependentOffset = GetKeyMemberOffset(constraint.ToRole, dependentProperty,
System\Data\Mapping\ViewGeneration\BasicViewGenerator.cs (2)
447var pkColumns = pkFkInfo.Item2.ToRole.GetEntityType().KeyMembers; 456yield return pkFkInfo.Item1.AssociationSetEnds.Where(ase => ase.Name == pkFkInfo.Item2.ToRole.Name).Single().EntitySet;
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (4)
106AssociationEndMember toEndMember = (AssociationEndMember)constraint.ToRole; 117Debug.Assert(constraint.ToRole.RelationshipMultiplicity.Equals(RelationshipMultiplicity.Many) == false); 134AssociationEndMember toEndMember = (AssociationEndMember)constraint.ToRole; 145Debug.Assert(constraint.ToRole.RelationshipMultiplicity.Equals(RelationshipMultiplicity.One));
System\Data\Mapping\ViewGeneration\Structures\MemberPath.cs (2)
719end1.Name == constraint.ToRole.Name; 721end0.Name == constraint.ToRole.Name;
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (1)
119EntitySet childExtent = endToExtents[constraint.ToRole.Name];
System\Data\Metadata\Converter.cs (1)
521referentialConstraint.ToRole.Documentation = ConvertToDocumentation(constraint.DependentRole.Documentation);
System\Data\Metadata\Edm\EntitySet.cs (2)
143if (constraint.ToRole.GetEntityType().IsAssignableFrom(this.ElementType) || 144this.ElementType.IsAssignableFrom(constraint.ToRole.GetEntityType()))
System\Data\Metadata\Edm\NavigationProperty.cs (1)
150RelationshipEndMember dependentEndMember = rc.ToRole;
System\Data\Metadata\Edm\ReferentialConstraint.cs (3)
64return this.FromRole.Name + "_" + this.ToRole.Name; 128return this.FromRole.Name + "_" + this.ToRole.Name; 146RelationshipEndMember toRole = ToRole;
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (1)
608if (constraint.ToRole == FromEndProperty)
System\Data\Objects\DataClasses\RelatedEnd.cs (5)
422if (fkConstraint.ToRole.EdmEquals(_toEndProperty)) 1490if (constraint.ToRole == this.FromEndProperty) 1494EntityType entityType = constraint.ToRole.GetEntityType(); 1527EntityType entityType = constraint.ToRole.GetEntityType(); 1808if (constraint.ToRole == FromEndProperty)
System\Data\Objects\DataClasses\RelationshipManager.cs (1)
1464if (constraint.ToRole.TypeUsage.EdmType == entitySet.ElementType.GetReferenceType())
System\Data\Objects\EntityEntry.cs (4)
162EntityType dependentType = MetadataHelper.GetEntityTypeForEnd((AssociationEndMember)constraint.ToRole); 2733if (constraint.ToRole.Name == thisRole) 3755RelatedEnd principalEnd = RelationshipManager.GetRelatedEndInternal(principal.Item1.ElementType.FullName, principal.Item2.ToRole.Name); 3842string dependentId = constraint.ToRole.Identity;
System\Data\Objects\ObjectStateManager.cs (1)
3266if (constraint.ToRole == reference.FromEndProperty)
System\Data\Query\PlanCompiler\ConstraintManager.cs (2)
113internal md.RelationshipMultiplicity ChildMultiplicity { get { return m_constraint.ToRole.RelationshipMultiplicity; } } 133md.AssociationEndMember toEnd = constraint.ToRole as md.AssociationEndMember;
System\Data\SqlClient\SqlProviderUtilities.cs (1)
198var dependentEnd = associationSet.AssociationSetEnds[constraint.ToRole.Name];
System.Data.Entity.Design (6)
System\Data\Entity\Design\Common\MetadataItemSerializer.cs (1)
298WriteReferentialConstraintRoleElement(XmlConstants.DependentRole, constraint.ToRole, constraint.ToProperties);
System\Data\Entity\Design\Common\OneToOneMappingSerializer.cs (3)
232return ((RefType)constraint0.ToRole.TypeUsage.EdmType).ElementType == _storeEntitySet.ElementType && ((RefType)constraint1.ToRole.TypeUsage.EdmType).ElementType == _storeEntitySet.ElementType; 415return store.AssociationSetEnds.GetValue(constraint.ToRole.Name, false);
System\Data\Entity\Design\EntityModelSchemaGenerator.cs (2)
963storeConstraint.ToRole.RelationshipMultiplicity == RelationshipMultiplicity.Many && 1003AssociationEndMember toRole = session.MappingLookups.StoreAssociationEndMemberToModelAssociationEndMember[(AssociationEndMember)storeConstraint.ToRole];
System.Data.Services (1)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (1)
1940WriteReferentialConstraintChildElement(xmlWriter, XmlConstants.Dependent, referentialConstraint.ToRole.Name, referentialConstraint.ToProperties);
System.Web.DynamicData (1)
DynamicData\ModelProviders\EFAssociationProvider.cs (1)
112ReferentialConstraint constraint = relationshipType.ReferentialConstraints.FirstOrDefault(c => c.ToRole == navigationProperty.ToEndMember);