104 references to ElementType
System.Data.Entity (80)
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (2)
128
assocSet.
ElementType
.IsForeignKey &&
156
var fkConstraint = relSet.
ElementType
.ReferentialConstraints[0];
System\Data\Common\Utils\MetadataHelper.cs (2)
508
AssociationType assocType = assocSet.
ElementType
;
551
foreach (AssociationEndMember endMember in associationSet.
ElementType
.Members)
System\Data\Mapping\BaseMetadataMappingVisitor.cs (1)
83
Visit(associationSet.
ElementType
);
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (6)
277
if (aSet.
ElementType
.IsForeignKey)
289
Debug.Assert(aSet.
ElementType
.ReferentialConstraints.Count == 1, "aSet.ElementType.ReferentialConstraints.Count == 1");
290
ReferentialConstraint rc = aSet.
ElementType
.ReferentialConstraints.Single();
322
foreach (AssociationEndMember end in aSet.
ElementType
.AssociationEndMembers)
345
return TypeUsage.Create(aSet.
ElementType
).New(ends);
347
return GeneratedView.CreateGeneratedViewForFKAssociationSet(aSet, aSet.
ElementType
, new DbQueryCommandTree(workspace, DataSpace.SSpace, qView), storageMappingItemCollection, m_config);
System\Data\Mapping\StorageMappingItemLoader.cs (8)
689
&& !associationSet.
ElementType
.IsForeignKey)
708
&& !associationSet.
ElementType
.IsForeignKey)
1422
if (associationSet.
ElementType
.IsForeignKey)
1424
ReferentialConstraint constraint = associationSet.
ElementType
.ReferentialConstraints.Single();
1426
if (associationSet.
ElementType
.ReferentialConstraints.Single().ToProperties.All(p => dependentKeys.Contains(p)))
3807
IEnumerable<StorageModificationFunctionParameterBinding> parameters = LoadParameterBindings(nav.Clone(), m_associationSet.
ElementType
);
4068
if (associationSet.
ElementType
.IsForeignKey)
4070
ReferentialConstraint constraint = associationSet.
ElementType
.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\Propagator.ExtentPlaceholderCreator.cs (2)
165
var endMetadata = associationSet.
ElementType
.AssociationEndMembers;
189
PropagatorResult result = PropagatorResult.CreateStructuralValue(endReferenceValues, associationSet.
ElementType
, false);
System\Data\Mapping\Update\Internal\RelationshipConstraintValidator.cs (3)
141
Debug.Assert(associationSet.
ElementType
.Equals(record.DataRecordInfo.RecordType.EdmType));
241
violationType.Value, actualRelationship.AssociationSet.
ElementType
.FullName,
328
if (null != associationSet && !associationSet.
ElementType
.IsForeignKey)
System\Data\Mapping\Update\Internal\UpdateCommandOrderer.cs (1)
106
AssociationType associationType = associationSet.
ElementType
;
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (3)
171
if (0 < associationSet.
ElementType
.ReferentialConstraints.Count)
175
foreach (ReferentialConstraint constraint in associationSet.
ElementType
.ReferentialConstraints)
328
Strings.Update_InsertingOrUpdatingReferenceToDeletedEntity(associationSet.
ElementType
.FullName),
System\Data\Mapping\ViewGeneration\CqlGenerator.cs (1)
398
AssociationType associationType = associationSet.
ElementType
;
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (3)
54
foreach (var endMember in assocSet.
ElementType
.AssociationEndMembers)
102
AssociationType assocType = assocSet.
ElementType
;
131
AssociationType assocType = assocSet.
ElementType
;
System\Data\Mapping\ViewGeneration\Structures\MemberPath.cs (1)
713
AssociationType assocType = assocSet.
ElementType
;
System\Data\Mapping\ViewGeneration\Structures\WithStatement.cs (1)
84
CqlWriter.AppendEscapedTypeName(builder, m_associationSet.
ElementType
);
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (3)
107
AssociationType relationType = relationSet.
ElementType
;
375
var foreignKeyAssociations = childContext.EntityContainerMapping.EdmEntityContainer.BaseEntitySets.OfType<AssociationSet>().Where(it => it.
ElementType
.IsForeignKey).Select(it => it.
ElementType
);
System\Data\Mapping\ViewGeneration\Validation\ViewKeyConstraint.cs (1)
173
AssociationEndMember endMember = Helper.GetEndThatShouldBeMappedToKey(associationSet.
ElementType
);
System\Data\Mapping\ViewGeneration\ViewgenContext.cs (3)
137
var allForeignKeyAssociationSets = this.m_entityContainerMapping.EdmEntityContainer.BaseEntitySets.OfType<AssociationSet>().Where(it => it.
ElementType
.IsForeignKey);
139
var oneToOneForeignKeyAssociationsForThisWrapper = allForeignKeyAssociationSets.Select(it => it.
ElementType
);
146
var oneToOneForeignKeyAssociationSetsForThisWrapper = allForeignKeyAssociationSets.Where(it => oneToOneForeignKeyAssociationsForThisWrapper.Contains(it.
ElementType
));
System\Data\Mapping\ViewGeneration\ViewgenGatekeeper.cs (1)
248
if (associationSet==null || !associationSet.
ElementType
.IsForeignKey)
System\Data\Metadata\Edm\EntitySet.cs (3)
138
if (associationSet.
ElementType
.IsForeignKey)
141
Debug.Assert(associationSet.
ElementType
.ReferentialConstraints.Count == 1, "Expected exactly one constraint for FK");
142
ReferentialConstraint constraint = associationSet.
ElementType
.ReferentialConstraints[0];
System\Data\Objects\DataClasses\RelatedEnd.cs (1)
2349
if (associationset.
ElementType
== relationshipType &&
System\Data\Objects\DataClasses\RelationshipManager.cs (6)
742
EntityType end2EntityType = ((AssociationType)assocSet.
ElementType
).AssociationEndMembers[1].GetEntityType();
745
yield return ((AssociationType)assocSet.
ElementType
).AssociationEndMembers[0];
748
EntityType end1EntityType = ((AssociationType)assocSet.
ElementType
).AssociationEndMembers[0].GetEntityType();
751
yield return ((AssociationType)assocSet.
ElementType
).AssociationEndMembers[1];
1456
if (skipFK && association.
ElementType
.IsForeignKey)
1462
foreach (ReferentialConstraint constraint in association.
ElementType
.ReferentialConstraints)
System\Data\Objects\EntityEntry.cs (10)
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;
2728
foreach (ReferentialConstraint constraint in association.
ElementType
.ReferentialConstraints)
2801
foreach (ReferentialConstraint constraint in association.
ElementType
.ReferentialConstraints)
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;
3755
RelatedEnd principalEnd = RelationshipManager.GetRelatedEndInternal(principal.Item1.
ElementType
.FullName, principal.Item2.ToRole.Name);
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\ObjectStateManager.cs (2)
1174
if (associationSet.
ElementType
.IsForeignKey)
1393
EntityReference reference = entry.WrappedEntity.RelationshipManager.GetRelatedEndInternal(((AssociationSet)relationshipEntry.EntitySet).
ElementType
.FullName, targetRoleName) as EntityReference;
System\Data\Objects\RelationshipEntry.cs (6)
236
this.RelationshipWrapper.AssociationSet.
ElementType
.FullName,
245
this.RelationshipWrapper.AssociationSet.
ElementType
.FullName,
373
Debug.Assert(associationSet.
ElementType
.AssociationEndMembers[0].Name == associationMember.Name ||
374
associationSet.
ElementType
.AssociationEndMembers[1].Name == associationMember.Name,
383
if (_relationshipWrapper.AssociationSet.
ElementType
.AssociationEndMembers[0].Name == associationMember.Name)
517
string relationshipName = ((AssociationSet)_entitySet).
ElementType
.FullName;
System\Data\Objects\RelationshipWrapper.cs (6)
59
Debug.Assert(extent.
ElementType
.AssociationEndMembers.Count == 2, "only 2 ends are supported");
67
if (extent.
ElementType
.AssociationEndMembers[0].Name == role0)
69
Debug.Assert(extent.
ElementType
.AssociationEndMembers[1].Name == role1, "a)roleAndKey1 Name differs");
75
Debug.Assert(extent.
ElementType
.AssociationEndMembers[0].Name == role1, "b)roleAndKey1 Name differs");
76
Debug.Assert(extent.
ElementType
.AssociationEndMembers[1].Name == role0, "b)roleAndKey0 Name differs");
84
get { return this.AssociationSet.
ElementType
.AssociationEndMembers; }
System\Data\Query\PlanCompiler\PreProcessor.cs (1)
1554
rs.
ElementType
.EdmEquals(relProperty.Relationship) &&
System\Data\SqlClient\SqlProviderUtilities.cs (1)
196
var constraint = associationSet.
ElementType
.ReferentialConstraints.Single();
System.Data.Entity.Design (19)
System\Data\Entity\Design\Common\MetadataItemSerializer.cs (1)
713
_writer.WriteAttributeString(XmlConstants.Association, GetFullName(associationSet.
ElementType
));
System\Data\Entity\Design\Common\OneToOneMappingSerializer.cs (11)
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];
348
if (!collapsedAssociationSet.ModelAssociationSet.
ElementType
.IsForeignKey)
352
writer.WriteAttributeString(StorageMslConstructs.AssociationSetMappingTypeNameAttribute, collapsedAssociationSet.ModelAssociationSet.
ElementType
.FullName);
374
if (!model.
ElementType
.IsForeignKey)
378
writer.WriteAttributeString(StorageMslConstructs.AssociationSetMappingTypeNameAttribute, model.
ElementType
.FullName);
422
foreach (ReferentialConstraint rc in set.
ElementType
.ReferentialConstraints)
System\Data\Entity\Design\EntityModelSchemaGenerator.cs (7)
337
if (this.GenerateForeignKeyProperties || !EntityStoreSchemaGenerator.IsFkPartiallyContainedInPK(((AssociationSet)storeSet).
ElementType
, out errorMessage))
431
set.ModelAssociationSet.
ElementType
.SetReadOnly();
432
session.EdmItemCollection.AddInternal(set.ModelAssociationSet.
ElementType
);
672
session.FkProperties.Add(property, ((AssociationSet)storeSet).
ElementType
);
877
if (! session.MappingLookups.StoreAssociationTypeToModelAssociationType.TryGetValue(storeAssociationSet.
ElementType
, out association))
879
association = CreateModelAssociationType(session, storeAssociationSet.
ElementType
);
880
session.MappingLookups.StoreAssociationTypeToModelAssociationType.Add(storeAssociationSet.
ElementType
, association);
System.Data.Services (3)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (3)
129
if (associationSet.
ElementType
== sourceNavigationProperty.RelationshipType)
1096
if (associationSet.
ElementType
== associationType)
1764
xmlWriter.WriteAttributeString(XmlConstants.Association, associationSet.
ElementType
.FullName);
System.Web.Entity (2)
System\Data\WebControls\EntityDataSourceColumn.cs (1)
321
builder.Append(EntityDataSourceUtil.CreateEntitySqlTypeIdentifier(this.Group.End.ParentAssociationSet.
ElementType
));
System\Data\WebControls\EntityDataSourceReferenceGroup.cs (1)
136
this.End.ParentAssociationSet.
ElementType
.FullName,