118 references to KeyMembers
System.Data.Entity (88)
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (1)
1144IList<EdmMember> keyMembers = entityType.KeyMembers;
System\Data\Common\Utils\MetadataHelper.cs (2)
512thisEndsEntityType.KeyMembers.Select(edmMember => new Pair<EdmMember, EntityType>(edmMember, thisEndsEntityType))); 701return ((EntityType)member.DeclaringType).KeyMembers.Contains(member);
System\Data\EntityKey.cs (11)
723if (((EntitySetBase)entitySet).ElementType.KeyMembers.Count != numKeyMembers) 743EdmMember singletonKeyMember = ((EntitySetBase)entitySet).ElementType.KeyMembers[0]; 757EdmMember keyMember = ((EntitySetBase)entitySet).ElementType.KeyMembers[i]; 942int numExpectedKeyValues = ((EntitySetBase)entitySet).ElementType.KeyMembers.Count; 956EdmMember member = entityType.KeyMembers[0]; 969EdmMember member = entityType.KeyMembers[i]; 1005ReadOnlyMetadataCollection<EdmMember> keyMembers = ((EntitySetBase)entitySet).ElementType.KeyMembers; 1054EdmMember keyField = ((EntitySetBase)entitySet).ElementType.KeyMembers[i]; 1164Debug.Assert(entitySet.ElementType.KeyMembers.Count == 1, "For a singleton key, the number of key fields must be exactly 1."); 1172Debug.Assert(entitySet.ElementType.KeyMembers.Count > 1, "For a composite key, the number of key fields should be greater than 1."); 1173Debug.Assert(entitySet.ElementType.KeyMembers.Count == _compositeKeyValues.Length, "Incorrect number of values specified to composite key.");
System\Data\Mapping\BaseMetadataMappingVisitor.cs (2)
92foreach (var kmember in entityType.KeyMembers) 120foreach (var keyMember in associationType.KeyMembers)
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (2)
327foreach (EdmMember keyMember in dependentSet.ElementType.KeyMembers) 337foreach (EdmMember keyMember in principalSet.ElementType.KeyMembers)
System\Data\Mapping\StorageMappingItemLoader.cs (6)
1425IEnumerable<EdmMember> dependentKeys = MetadataHelper.GetEntityTypeForEnd((AssociationEndMember)constraint.ToRole).KeyMembers; 2243keys = new EdmProperty[entityType.KeyMembers.Count]; 2246var mapping = propertyMappings[entityType.Properties.IndexOf((EdmProperty)entityType.KeyMembers[i])] as StorageScalarPropertyMapping; 3153if (!containerType.KeyMembers.Contains(scalarMap.EdmProperty)) 4077constraint.ToProperties.All(p => m_entitySet.ElementType.KeyMembers.Contains(p))) 4238!((EntityType)type).KeyMembers.TryGetValue(propertyName, false, out property))
System\Data\Mapping\Update\Internal\ExtractorMetadata.cs (3)
63keyMembers = new Set<EdmMember>(entityType.KeyMembers).MakeReadOnly(); 88entityKeyOrdinal = entityType.KeyMembers.IndexOf(member); 146identifier = m_translator.KeyManager.GetKeyIdentifierForMemberOffset(key, keyOrdinal, ((EntityType)m_type).KeyMembers.Count);
System\Data\Mapping\Update\Internal\KeyManager.cs (1)
307var keyMembers = addedEntry.EntitySet.ElementType.KeyMembers;
System\Data\Mapping\Update\Internal\Propagator.ExtentPlaceholderCreator.cs (3)
175PropagatorResult[] keyValues = new PropagatorResult[entityType.KeyMembers.Count]; 176for (int memberOrdinal = 0; memberOrdinal < entityType.KeyMembers.Count; memberOrdinal++) 178EdmMember keyMember = entityType.KeyMembers[memberOrdinal];
System\Data\Mapping\Update\Internal\TableChangeProcessor.cs (1)
86IList<EdmMember> keyMembers = tableType.KeyMembers;
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (5)
242object[] keyValues = new object[principalType.KeyMembers.Count]; 245EdmProperty keyMember = (EdmProperty)principalType.KeyMembers[i]; 311if (entitySet.ElementType.KeyMembers.Contains(dependentProperty)) 353keyMemberCount = entityType.KeyMembers.Count; 354return entityType.KeyMembers.IndexOf(property);
System\Data\Mapping\ViewGeneration\BasicViewGenerator.cs (1)
447var pkColumns = pkFkInfo.Item2.ToRole.GetEntityType().KeyMembers;
System\Data\Mapping\ViewGeneration\CqlGenerator.cs (1)
416foreach (EdmMember entityMember in refElementType.KeyMembers)
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (3)
57type.KeyMembers.All(member => associationkeys.Add(new Pair<EdmMember, EntityType>(member, type)) || true /* prevent early termination */); 111if (Helpers.IsSetEqual(toProperties, toEntitySet.ElementType.KeyMembers, EqualityComparer<EdmMember>.Default)) 141if (Helpers.IsSetEqual(toProperties, toEntitySet.ElementType.KeyMembers, EqualityComparer<EdmMember>.Default))
System\Data\Mapping\ViewGeneration\Structures\LeafCellTreeNode.cs (2)
231foreach (EdmProperty edmProperty in toEndEntityType.KeyMembers) 262IEnumerable<EdmMember> keyProperties = storeEntitySet.ElementType.KeyMembers;
System\Data\Mapping\ViewGeneration\Structures\TypeConstant.cs (1)
186List<MemberPath> keyMemberOutputPaths = new List<MemberPath>(entityType.KeyMembers.Select(km => new MemberPath(outputMember, km)));
System\Data\Mapping\ViewGeneration\Validation\ExtentKey.cs (1)
66foreach (EdmMember keyMember in entityType.KeyMembers)
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (2)
552foreach (EdmProperty property in entitySet.ElementType.KeyMembers) 828foreach (EdmProperty keyMember in m_childTable.ElementType.KeyMembers)
System\Data\Metadata\Edm\EdmType.cs (2)
182((EntityTypeBase)this).KeyMembers.Count == 0 || 183((EntityTypeBase)value).KeyMembers.Count == 0,
System\Data\Metadata\Edm\EntityType.cs (2)
187List<EdmProperty> keyProperties = new List<EdmProperty>(KeyMembers.Count); 188foreach (EdmMember keyMember in KeyMembers)
System\Data\Metadata\Edm\EntityTypeBase.cs (6)
53if (this.BaseType != null && ((EntityTypeBase)this.BaseType).KeyMembers.Count != 0) 56return ((EntityTypeBase)this.BaseType).KeyMembers; 76keyNames = new string[this.KeyMembers.Count]; 79keyNames[i] = this.KeyMembers[i].Name; 83Debug.Assert(_keyMemberNames.Length == this.KeyMembers.Count, "This list is out of sync with the key members count. This property was called before all the keymembers were added"); 101Debug.Assert(this.BaseType == null || ((EntityTypeBase)this.BaseType).KeyMembers.Count == 0,
System\Data\Metadata\Edm\NavigationProperty.cs (1)
155var keyMembers = rc.FromRole.GetEntityType().KeyMembers;
System\Data\Metadata\EdmValidator.cs (2)
306if (item.KeyMembers.Count < 1) 312foreach (EdmProperty keyProperty in item.KeyMembers)
System\Data\Metadata\TypeHelpers.cs (1)
409IEnumerable<EdmMember> entityKeys = entityType.KeyMembers;
System\Data\Metadata\TypeSemantics.cs (2)
601return ((RelationshipType)edmMember.DeclaringType).KeyMembers.Contains(edmMember); 611return ((EntityTypeBase)edmMember.DeclaringType).KeyMembers.Contains(edmMember);
System\Data\Objects\DataClasses\RelatedEnd.cs (2)
520AppendKeyParameterRow(sourceBuilder, key.GetEntitySet(ObjectContext.MetadataWorkspace).ElementType.KeyMembers); 540?? key.GetEntitySet(ObjectContext.MetadataWorkspace).ElementType.KeyMembers;
System\Data\Objects\EntityEntry.cs (1)
2925foreach (EdmMember member in entityType.KeyMembers)
System\Data\Objects\Internal\EntityProxyFactory.cs (1)
1201bool isKeyMember = _ospaceEntityType.KeyMembers.Contains(member.Identity);
System\Data\Objects\ObjectContext.cs (1)
2512ReadOnlyMetadataCollection<EdmMember> keyMembers = entitySet.ElementType.KeyMembers;
System\Data\Objects\ObjectStateManager.cs (3)
1480for (int i = 0; i < entitySetForKey.ElementType.KeyMembers.Count; ++i) 1482EdmMember keyField = entitySetForKey.ElementType.KeyMembers[i]; 3722ReadOnlyMetadataCollection<EdmMember> keyMembers = entitySet.ElementType.KeyMembers;
System\Data\Objects\ObjectStateManagerMetadata.cs (1)
172keyMembers = ((EntityType)edmType).KeyMembers;
System\Data\Query\InternalTrees\ColumnMapFactory.cs (1)
237IList<EdmMember> keyMembers = entityType.KeyMembers;
System\Data\Query\PlanCompiler\ColumnMapProcessor.cs (3)
234foreach (md.EdmMember keyProperty in TypeHelpers.GetEdmType<md.EntityType>(typeInfo.Type).KeyMembers) 443SimpleColumnMap[] keyColList = new SimpleColumnMap[entityType.KeyMembers.Count]; 446md.EdmMember property = entityType.KeyMembers[i];
System\Data\Query\PlanCompiler\ITreeGenerator.cs (1)
1218instanceType.KeyMembers.Contains(propertyExpression.Property))
System\Data\Query\PlanCompiler\PreProcessor.cs (1)
1608foreach (EdmMember k in entityType.KeyMembers)
System\Data\Query\PlanCompiler\PropertyPushdownHelper.cs (1)
203foreach (md.EdmMember p in entityType.KeyMembers)
System\Data\Query\PlanCompiler\StructuredTypeInfo.cs (1)
848typeMembers = refType.ElementType.KeyMembers;
System\Data\Query\PlanCompiler\TypeInfo.cs (1)
337foreach (md.EdmMember p in entityType.KeyMembers)
System\Data\SqlClient\SqlGen\DmlSqlGenerator.cs (5)
125foreach (EdmMember column in tableType.KeyMembers) 187foreach (EdmMember column in tableType.KeyMembers) 248foreach (EdmMember keyMember in ((DbScanExpression)tree.Target.Expression).Target.ElementType.KeyMembers) 354foreach (EdmMember keyMember in tableType.KeyMembers) 378foreach (EdmMember keyMember in table.ElementType.KeyMembers)
System\Data\SqlClient\SqlProviderUtilities.cs (1)
255AppendJoin(entitySet.ElementType.KeyMembers, k => AppendIdentifier(k.Name), ", ");
System.Data.Entity.Design (16)
System\Data\Entity\Design\Common\MetadataItemSerializer.cs (4)
368if (entityType.KeyMembers.Count != 0 && 369entityType.KeyMembers[0].DeclaringType == entityType) // they are declared on this entity 372for (int i = 0; i < entityType.KeyMembers.Count; i++) 375_writer.WriteAttributeString(XmlConstants.Name, entityType.KeyMembers[i].Name);
System\Data\Entity\Design\Common\OneToOneMappingSerializer.cs (1)
435foreach (EdmProperty storeKeyMember in store.EntitySet.ElementType.KeyMembers)
System\Data\Entity\Design\EntityModelSchemaGenerator.cs (2)
785bool isKey = storeEntityType.KeyMembers.TryGetValue(storeProperty.Name, false, out member); 1038return toType.KeyMembers.Contains(storeConstraint.ToProperties[0]);
System\Data\Entity\Design\EntityStoreSchemaGenerator.cs (6)
172Debug.Assert(type.KeyMembers.Count > 0, "Why do we have Entities without keys in our valid Entities collection"); 918if (entity.KeyMembers.Count != columns.Count) 927if (!entity.KeyMembers.Contains(getColumnName(row))) 1061toPropertiesAreFullyContainedInPk &= toType.KeyMembers.Contains(edmProperty); 1063toPropertiesContainedAtLeastOnePK |= toType.KeyMembers.Contains(edmProperty); 1068string primaryKeys = MetadataUtil.MembersToCommaSeparatedString((System.Collections.IEnumerable)toType.KeyMembers);
System\Data\EntityModel\Emitters\EntityTypeEmitter.cs (2)
56if ( Item.KeyMembers.Count > 0 && typeDecls.Count == 1 ) 61foreach ( EdmMember keyProperty in Item.KeyMembers)
System\Data\EntityModel\Emitters\PropertyEmitter.cs (1)
680return entity.KeyMembers.Contains(Item.Name);
System.Data.Services (2)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (2)
1409((EntityType)edmType).KeyMembers.Contains(member)) 1859foreach (EdmMember member in entityType.KeyMembers)
System.Data.Services.Design (3)
System\Data\EntityModel\Emitters\AttributeEmitter.cs (1)
62object[] keys = emitter.Item.KeyMembers.Select(km => (object) km.Name).ToArray();
System\Data\EntityModel\Emitters\EntityTypeEmitter.cs (2)
57if (Item.KeyMembers.Count > 0 && typeDecls.Count == 1) 62foreach (EdmMember keyProperty in Item.KeyMembers)
System.Web.DynamicData (2)
DynamicData\ModelProviders\EFAssociationProvider.cs (1)
119return navigationProperty.FromEndMember.GetEntityType().KeyMembers.Select(m => m.Name);
DynamicData\ModelProviders\EFTableProvider.cs (1)
26var keyMembers = entityType.KeyMembers;
System.Web.Entity (7)
System\Data\WebControls\EntityDataSourceMemberPath.cs (1)
194isKey = entityType.KeyMembers.Contains(property);
System\Data\WebControls\EntityDataSourceUtil.cs (2)
947foreach (EdmMember keyMember in entityType.KeyMembers) 1034foreach (EdmProperty keyMember in GetEntityType(toEnd).KeyMembers)
System\Data\WebControls\EntityDataSourceView.cs (2)
763propTable = new EntityDataSourceViewSchema(results, entityType.KeyMembers.Select(x => x.Name).ToArray()); 1570_keyMembers = ((EntityType)(entitySet.ElementType)).KeyMembers;
System\Data\WebControls\OrderByBuilder.cs (2)
236keyMembers = entityType.KeyMembers; 237keyMemberNames = new List<string>(entityType.KeyMembers.Count);