57 references to FromRole
System.Data.Entity (49)
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (3)
162
var principalSetEnd = relSet.AssociationSetEnds[fkConstraint.
FromRole
.Name];
282
EntityType principalEntityType = (EntityType)TypeHelpers.GetEdmType<RefType>(fkConstraint.
FromRole
.TypeUsage).ElementType;
323
DbRelatedEntityRef result = DbExpressionBuilder.CreateRelatedEntityRef(fkConstraint.ToRole, fkConstraint.
FromRole
, principalRef);
System\Data\Common\Utils\MetadataHelper.cs (2)
522
otherEndType = (EntityType)((RefType)((AssociationEndMember)constraint.
FromRole
).TypeUsage.EdmType).ElementType;
524
else if (thisEnd.Equals((AssociationEndMember)constraint.
FromRole
))
System\Data\Mapping\BaseMetadataMappingVisitor.cs (1)
171
Visit(referentialConstraint.
FromRole
);
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (3)
293
EntitySet principalSet = aSet.AssociationSetEnds[rc.
FromRole
.Name].EntitySet;
299
EntityType principalType = MetadataHelper.GetEntityTypeForEnd((AssociationEndMember)rc.
FromRole
);
305
if (rc.
FromRole
.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne)
System\Data\Mapping\StorageMappingItemLoader.cs (1)
4314
if (constraint.
FromRole
== targetEnd)
System\Data\Mapping\StorageModificationFunctionMapping.cs (1)
218
ends.Add(assocationSet.AssociationSetEnds[constraint.
FromRole
.Name]);
System\Data\Mapping\Update\Internal\AssociationSetMetadata.cs (1)
96
AssociationEndMember principalEnd = (AssociationEndMember)constraint.
FromRole
;
System\Data\Mapping\Update\Internal\UpdateCommandOrderer.cs (1)
114
target = associationSet.AssociationSetEnds[constraint.
FromRole
.Name];
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (6)
178
EntityKey principalKey = (EntityKey)record[constraint.
FromRole
.Name];
191
int principalOffset = GetKeyMemberOffset(constraint.
FromRole
, principalPropertyEnum.Current,
237
if (!currentValues || !m_stateManager.TryGetReferenceKey(dependentKey, (AssociationEndMember)constraint.
FromRole
, out principalKey))
240
EntityType principalType = MetadataHelper.GetEntityTypeForEnd((AssociationEndMember)constraint.
FromRole
);
260
EntitySet principalSet = associationSet.AssociationSetEnds[constraint.
FromRole
.Name].EntitySet;
307
int principalOffset = GetKeyMemberOffset(constraint.
FromRole
, principalProperty, out principalKeyMemberCount);
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (3)
114
if (constraint.
FromRole
.RelationshipMultiplicity.Equals(RelationshipMultiplicity.One))
135
AssociationEndMember fromEndMember = (AssociationEndMember)constraint.
FromRole
;
144
Debug.Assert(constraint.
FromRole
.RelationshipMultiplicity.Equals(RelationshipMultiplicity.One));
System\Data\Mapping\ViewGeneration\Structures\MemberPath.cs (2)
718
bool isFrom0 = end0.Name == constraint.
FromRole
.Name &&
720
bool isFrom1 = end1.Name == constraint.
FromRole
.Name &&
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (1)
118
EntitySet parentExtent = endToExtents[constraint.
FromRole
.Name];
System\Data\Metadata\Converter.cs (1)
519
referentialConstraint.
FromRole
.Documentation = ConvertToDocumentation(constraint.PrincipalRole.Documentation);
System\Data\Metadata\Edm\EntitySet.cs (2)
149
if (constraint.
FromRole
.GetEntityType().IsAssignableFrom(this.ElementType) ||
150
this.ElementType.IsAssignableFrom(constraint.
FromRole
.GetEntityType()))
System\Data\Metadata\Edm\NavigationProperty.cs (1)
155
var keyMembers = rc.
FromRole
.GetEntityType().KeyMembers;
System\Data\Metadata\Edm\ReferentialConstraint.cs (3)
64
return this.
FromRole
.Name + "_" + this.ToRole.Name;
128
return this.
FromRole
.Name + "_" + this.ToRole.Name;
140
RelationshipEndMember fromRole =
FromRole
;
System\Data\Objects\DataClasses\EntityReference.cs (1)
638
if (TargetRoleName == constraint.
FromRole
.Name) // Only do this on the dependent end
System\Data\Objects\DataClasses\RelatedEnd.cs (3)
473
Debug.Assert(fkConstraint.
FromRole
.EdmEquals(_toEndProperty), "Source query for foreign key association related end is not based on principal or dependent?");
1525
if (constraint.
FromRole
== this._fromEndProperty)
1843
else if (constraint.
FromRole
== FromEndProperty)
System\Data\Objects\DataClasses\RelationshipManager.cs (1)
1475
if (constraint.
FromRole
.TypeUsage.EdmType == entitySet.ElementType.GetReferenceType())
System\Data\Objects\EntityEntry.cs (9)
179
EntityType dependentType = MetadataHelper.GetEntityTypeForEnd((AssociationEndMember)constraint.
FromRole
);
2102
var reference = RelationshipManager.GetRelatedEndInternal(dependent.Item1.ElementType.FullName, dependent.Item2.
FromRole
.Name) as EntityReference;
2542
dependent.Item1.ElementType.FullName, dependent.Item2.
FromRole
.Name) as EntityReference;
2806
if (constraint.
FromRole
.Name == thisRole)
3426
dependent.Item1.ElementType.FullName, dependent.Item2.
FromRole
.Name) as EntityReference;
3702
EntityReference reference = RelationshipManager.GetRelatedEndInternal(dependent.Item1.ElementType.FullName, dependent.Item2.
FromRole
.Name) as EntityReference;
3822
relationships.Add(new Pair<string, string>(dependent.Item1.ElementType.FullName, dependent.Item2.
FromRole
.Name));
3863
associationSet.ElementType.FullName, constraint.
FromRole
.Name) as EntityReference;
3889
dependent.Item1.ElementType.FullName, dependent.Item2.
FromRole
.Name) as EntityReference;
System\Data\Objects\Internal\ForeignKeyFactory.cs (1)
81
Debug.Assert(constraint.
FromRole
.Identity == relatedEnd.TargetRoleName, "Unexpected constraint role");
System\Data\Query\PlanCompiler\ConstraintManager.cs (1)
132
md.AssociationEndMember fromEnd = constraint.
FromRole
as md.AssociationEndMember;
System\Data\SqlClient\SqlProviderUtilities.cs (1)
197
var principalEnd = associationSet.AssociationSetEnds[constraint.
FromRole
.Name];
System.Data.Entity.Design (6)
System\Data\Entity\Design\Common\MetadataItemSerializer.cs (1)
297
WriteReferentialConstraintRoleElement(XmlConstants.PrincipalRole, constraint.
FromRole
, constraint.FromProperties);
System\Data\Entity\Design\Common\OneToOneMappingSerializer.cs (2)
143
if (set.AssociationSetEnds[0].CorrespondingAssociationEndMember == constraint.
FromRole
)
447
if (store.Name == constraint.
FromRole
.Name)
System\Data\Entity\Design\EntityModelSchemaGenerator.cs (3)
962
if (storeConstraint.
FromRole
.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne &&
966
return new KeyValuePair<string, RelationshipMultiplicity>(storeConstraint.
FromRole
.Name, RelationshipMultiplicity.One);
1002
AssociationEndMember fromRole = session.MappingLookups.StoreAssociationEndMemberToModelAssociationEndMember[(AssociationEndMember)storeConstraint.
FromRole
];
System.Data.Services (1)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (1)
1939
WriteReferentialConstraintChildElement(xmlWriter, XmlConstants.Principal, referentialConstraint.
FromRole
.Name, referentialConstraint.FromProperties);
System.Web.Entity (1)
System\Data\WebControls\EntityDataSourceUtil.cs (1)
793
if (candidate.
FromRole
.Name == endMember.Name)