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