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