19 instantiations of EntityKey
System.Data.Entity (18)
System\Data\EntityKey.cs (2)
77
public static readonly EntityKey NoEntitySetKey = new
EntityKey
(s_NoEntitySetKey);
83
public static readonly EntityKey EntityNotValidKey = new
EntityKey
(s_EntityNotValidKey);
System\Data\Mapping\Update\Internal\KeyManager.cs (2)
334
? new
EntityKey
(addedEntry.EntitySet, keyValues[0])
335
: new
EntityKey
(addedEntry.EntitySet, keyValues);
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (2)
263
principalKey = new
EntityKey
(principalSet, keyValues[0]);
267
principalKey = new
EntityKey
(principalSet, keyValues);
System\Data\Objects\DataClasses\EntityReference.cs (2)
538
SetCachedForeignKey(new
EntityKey
(principalEntitySet, value), dependentEntity.ObjectStateEntry);
544
SetCachedForeignKey(new
EntityKey
(principalEntitySet, values), dependentEntity.ObjectStateEntry);
System\Data\Objects\EntityEntry.cs (1)
3472
existingPrincipalKey = new
EntityKey
((EntitySet)existingPrincipalEntry.EntitySet, (IExtendedDataRecord)existingPrincipalEntry.CurrentValues);
System\Data\Objects\Internal\ForeignKeyFactory.cs (3)
66
EntityKey nullKey = new
EntityKey
(s_NullForeignKey, originalKey.EntityKeyValues);
105
return keyValue == DBNull.Value ? null : new
EntityKey
(principalEntitySet, keyValue);
131
return new
EntityKey
(principalEntitySet, values);
System\Data\Objects\ObjectStateManager.cs (6)
417
entityKey = new
EntityKey
(entitySet);
1984
newKey = new
EntityKey
((EntitySet)entry.EntitySet, (IExtendedDataRecord)entry.CurrentValues);
2076
EntityKey newKey = new
EntityKey
(entry.EntitySet);
3515
EntityKey permanentRelatedKey = new
EntityKey
((EntitySet)relatedEntry.EntitySet, (IExtendedDataRecord)relatedEntry.CurrentValues);
3744
return new
EntityKey
(entitySet, keyValues[0]);
3748
return new
EntityKey
(entitySet, keyValues);
System.Web.Entity (1)
System\Data\WebControls\EntityDataSourceReferenceGroup.cs (1)
121
reference.EntityKey = new
EntityKey
(EntityDataSourceUtil.GetQualifiedEntitySetName(End.EntitySet), (IEnumerable<KeyValuePair<string, object>>)newKeyValues);
422 references to EntityKey
System.Data.Entity (416)
System\Data\Common\EntityRecordInfo.cs (9)
21
private readonly
EntityKey
_entityKey;
30
public EntityRecordInfo(EntityType metadata, IEnumerable<EdmMember> memberInfo,
EntityKey
entityKey, EntitySet entitySet)
32
EntityUtil.CheckArgumentNull<
EntityKey
>(entityKey, "entityKey");
45
internal EntityRecordInfo(EntityType metadata,
EntityKey
entityKey, EntitySet entitySet)
47
EntityUtil.CheckArgumentNull<
EntityKey
>(entityKey, "entityKey");
68
internal EntityRecordInfo(DataRecordInfo info,
EntityKey
entityKey, EntitySet entitySet)
89
public
EntityKey
EntityKey {
99
!object.ReferenceEquals(_entityKey,
EntityKey
.EntityNotValidKey) &&
100
!object.ReferenceEquals(_entityKey,
EntityKey
.NoEntitySetKey) &&
System\Data\Common\EntityUtil.cs (6)
976
internal static NotSupportedException RecyclingEntity(
EntityKey
key, Type newEntityType, Type existingEntityType) {
979
internal static InvalidOperationException AddedEntityAlreadyExists(
EntityKey
key) {
1485
internal static void CheckEntityKeyNull(
EntityKey
entityKey)
1492
internal static void CheckEntityKeysMatch(IEntityWrapper wrappedEntity,
EntityKey
key)
1508
internal static void ValidateEntitySetInKey(
EntityKey
key, EntitySet entitySet)
1512
internal static void ValidateEntitySetInKey(
EntityKey
key, EntitySet entitySet, string argument)
System\Data\Common\Internal\Materialization\RecordState.cs (1)
276
internal bool SetEntityRecordInfo(
EntityKey
entityKey, EntitySet entitySet)
System\Data\Common\Internal\Materialization\Shaper.cs (9)
137
public IEntityWrapper HandleEntity<TEntity>(IEntityWrapper wrappedEntity,
EntityKey
entityKey, EntitySet entitySet)
181
public IEntityWrapper HandleEntityAppendOnly<TEntity>(Func<Shaper, IEntityWrapper> constructEntityDelegate,
EntityKey
entityKey, EntitySet entitySet)
270
EntityKey
sourceKey = wrappedSource.EntityKey;
281
public IEntityWrapper HandleRelationshipSpan<T_SourceEntity>(IEntityWrapper wrappedEntity,
EntityKey
targetKey, AssociationEndMember targetMember)
290
EntityKey
sourceKey = wrappedEntity.EntityKey;
547
public bool SetEntityRecordInfo(int recordStateSlotNumber,
EntityKey
entityKey, EntitySet entitySet)
665
private void CheckClearedEntryOnSpan(object targetValue, IEntityWrapper wrappedSource,
EntityKey
sourceKey, AssociationEndMember targetMember)
692
private void CheckClearedEntryOnSpan(
EntityKey
sourceKey, IEntityWrapper wrappedSource, AssociationEndMember targetMember)
725
EntityKey
sourceKey = wrappedSource.EntityKey;
System\Data\Common\Internal\Materialization\Translator.cs (12)
356
result = typeof(
EntityKey
);
551
private static readonly ConstructorInfo EntityKey_ctor_SingleKey = typeof(
EntityKey
).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(EntitySet), typeof(object) }, null);
552
private static readonly ConstructorInfo EntityKey_ctor_CompositeKey = typeof(
EntityKey
).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(EntitySet), typeof(object[]) }, null);
769
new Type[] { actualType, typeof(
EntityKey
), typeof(EntitySet), typeof(ObjectContext), typeof(MergeOption), typeof(Type) }, null);
795
new Type[] { actualType, typeof(
EntityKey
), typeof(EntitySet), typeof(ObjectContext), typeof(MergeOption), typeof(Type),
920
return Expression.Constant(null, typeof(
EntityKey
));
983
noEntityKeyExpression = Expression.Constant(
EntityKey
.NoEntitySetKey, typeof(
EntityKey
));
987
noEntityKeyExpression = Expression.Constant(null, typeof(
EntityKey
));
1601
recordStateScratchpad.DataRecordInfo = new EntityRecordInfo(entityTypeMetadata,
EntityKey
.EntityNotValidKey, null);
1753
if (typeof(
EntityKey
) == spannedResultReader.Type)
2049
Expression.Constant(null, typeof(
EntityKey
))
System\Data\EntityKey.cs (21)
30
public sealed class EntityKey : IEquatable<
EntityKey
>
77
public static readonly
EntityKey
NoEntitySetKey = new EntityKey(s_NoEntitySetKey);
83
public static readonly
EntityKey
EntityNotValidKey = new EntityKey(s_EntityNotValidKey);
258
_entitySetName =
EntityKey
.LookupSingletonName(value);
278
_entityContainerName =
EntityKey
.LookupSingletonName(value);
401
return InternalEquals(this, obj as
EntityKey
, compareEntitySets: true);
409
public bool Equals(
EntityKey
other)
489
public static bool operator ==(
EntityKey
key1,
EntityKey
key2)
509
public static bool operator !=(
EntityKey
key1,
EntityKey
key2)
529
internal static bool InternalEquals(
EntityKey
key1,
EntityKey
key2, bool compareEntitySets)
629
internal static bool CompositeValuesWithBinaryEqual(
EntityKey
key1,
EntityKey
key2)
650
private static bool ValuesWithBinaryEqual(string keyName, object keyValue,
EntityKey
key2)
662
private static bool CompositeValuesEqual(
EntityKey
key1,
EntityKey
key2)
683
private static bool ValuesEqual(string keyName, object keyValue,
EntityKey
key2)
895
keyNames[0] = tokenizeStrings ?
EntityKey
.LookupSingletonName(keyValuePair.Key) : keyValuePair.Key;
915
keyNames[i] = tokenizeStrings ?
EntityKey
.LookupSingletonName(keyValuePair.Key) : keyValuePair.Key;
System\Data\IEntityStateEntry.cs (1)
29
EntityKey
EntityKey { get; }
System\Data\IEntityStateManager.cs (5)
25
IEnumerable<IEntityStateEntry> FindRelationshipsByKey(
EntityKey
key);
26
IEntityStateEntry GetEntityStateEntry(
EntityKey
key);
27
bool TryGetEntityStateEntry(
EntityKey
key, out IEntityStateEntry stateEntry);
28
bool TryGetReferenceKey(
EntityKey
dependentKey, AssociationEndMember principalRole, out
EntityKey
principalKey);
System\Data\Mapping\Update\Internal\ExtractorMetadata.cs (5)
134
EntityKey
key, int ordinal, ModifiedPropertiesBehavior modifiedPropertiesBehavior)
174
EntityKey
entityKey = value as
EntityKey
;
198
private PropagatorResult CreateEntityKeyResult(IEntityStateEntry stateEntry,
EntityKey
entityKey)
305
EntityKey
key = stateEntry.EntityKey;
System\Data\Mapping\Update\Internal\FunctionMappingTranslator.cs (4)
83
EntityKey
entityKey = stateEntry.Source.EntityKey;
138
EntityKey
source,
145
Func<DbDataRecord, int,
EntityKey
> getEntityKey = (record, ordinal) => (
EntityKey
)record[ordinal];
System\Data\Mapping\Update\Internal\KeyManager.cs (14)
24
private readonly Dictionary<Tuple<
EntityKey
, string, bool>, int> _foreignKeyIdentifiers = new Dictionary<Tuple<
EntityKey
, string, bool>, int>();
25
private readonly Dictionary<
EntityKey
,
EntityKey
> _valueKeyToTempKey = new Dictionary<
EntityKey
,
EntityKey
>();
26
private readonly Dictionary<
EntityKey
, int> _keyIdentifiers = new Dictionary<
EntityKey
, int>();
106
internal int GetKeyIdentifierForMemberOffset(
EntityKey
entityKey, int memberOffset, int keyMemberCount)
129
internal int GetKeyIdentifierForMember(
EntityKey
entityKey, string member, bool currentValues)
305
EntityKey
tempKey = addedEntry.EntityKey;
306
EntityKey
valueKey;
356
internal bool TryGetTempKey(
EntityKey
valueKey, out
EntityKey
tempKey)
System\Data\Mapping\Update\Internal\RelationshipConstraintValidator.cs (8)
78
EntityKey
entityKey = EntityUtil.CheckArgumentNull(stateEntry.EntityKey, "stateEntry.EntityKey");
144
Dictionary<string,
EntityKey
> endNameToKeyMap = new Dictionary<string,
EntityKey
>(
149
EntityKey
entityKey = (
EntityKey
)record.GetValue(field.Ordinal);
165
EntityKey
toEntityKey = endNameToKeyMap[toEnd.CorrespondingAssociationEndMember.Name];
359
internal readonly
EntityKey
ToEntityKey;
388
internal DirectionalRelationship(
EntityKey
toEntityKey, AssociationEndMember fromEnd, AssociationEndMember toEnd, AssociationSet associationSet, IEntityStateEntry stateEntry)
System\Data\Mapping\Update\Internal\UpdateCommand.cs (10)
101
KeyToListMap<
EntityKey
, UpdateCommand> addedEntities,
102
KeyToListMap<
EntityKey
, UpdateCommand> deletedEntities,
103
KeyToListMap<
EntityKey
, UpdateCommand> addedRelationships,
104
KeyToListMap<
EntityKey
, UpdateCommand> deletedRelationships)
146
EntityKey
end1 = (
EntityKey
)record[0];
147
EntityKey
end2 = (
EntityKey
)record[1];
150
KeyToListMap<
EntityKey
, UpdateCommand> affected = isAdded ? addedRelationships : deletedRelationships;
160
private void AddReferencedEntities(UpdateTranslator translator, PropagatorResult result, KeyToListMap<
EntityKey
, UpdateCommand> referencedEntities)
System\Data\Mapping\Update\Internal\UpdateCommandOrderer.cs (15)
334
KeyToListMap<
EntityKey
, UpdateCommand> addedEntities = new KeyToListMap<
EntityKey
, UpdateCommand>(EqualityComparer<
EntityKey
>.Default);
335
KeyToListMap<
EntityKey
, UpdateCommand> deletedEntities = new KeyToListMap<
EntityKey
, UpdateCommand>(EqualityComparer<
EntityKey
>.Default);
336
KeyToListMap<
EntityKey
, UpdateCommand> addedRelationships = new KeyToListMap<
EntityKey
, UpdateCommand>(EqualityComparer<
EntityKey
>.Default);
337
KeyToListMap<
EntityKey
, UpdateCommand> deletedRelationships = new KeyToListMap<
EntityKey
, UpdateCommand>(EqualityComparer<
EntityKey
>.Default);
351
private void AddModelDependencies(KeyToListMap<
EntityKey
, UpdateCommand> producedMap, KeyToListMap<
EntityKey
, UpdateCommand> requiredMap)
355
EntityKey
key = keyAndCommands.Key;
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (25)
57
m_knownEntityKeys = new Set<
EntityKey
>();
58
m_requiredEntities = new Dictionary<
EntityKey
, AssociationSet>();
59
m_optionalEntities = new Set<
EntityKey
>();
60
m_includedValueEntities = new Set<
EntityKey
>();
90
private readonly Set<
EntityKey
> m_knownEntityKeys;
91
private readonly Dictionary<
EntityKey
, AssociationSet> m_requiredEntities;
92
private readonly Set<
EntityKey
> m_optionalEntities;
93
private readonly Set<
EntityKey
> m_includedValueEntities;
178
EntityKey
principalKey = (
EntityKey
)record[constraint.FromRole.Name];
179
EntityKey
dependentKey = (
EntityKey
)record[constraint.ToRole.Name];
225
EntityKey
dependentKey = stateEntry.EntityKey;
234
EntityKey
principalKey = null;
276
EntityKey
tempKey;
362
internal IEnumerable<IEntityStateEntry> GetRelationships(
EntityKey
entityKey)
867
foreach (KeyValuePair<
EntityKey
, AssociationSet> required in m_requiredEntities)
869
EntityKey
key = required.Key;
889
foreach (
EntityKey
key in m_optionalEntities)
903
foreach (
EntityKey
key in m_includedValueEntities)
933
EntityKey
entityKey = stateEntry.EntityKey;
962
EntityKey
end = (
EntityKey
)record.GetValue(field.Ordinal);
1008
private void AddValidAncillaryKey(
EntityKey
key, Set<
EntityKey
> keySet)
System\Data\Objects\DataClasses\EntityObject.cs (2)
31
private
EntityKey
_entityKey;
103
public
EntityKey
EntityKey
System\Data\Objects\DataClasses\EntityReference.cs (18)
38
private
EntityKey
_detachedEntityKey = null;
44
private
EntityKey
_cachedForeignKey;
84
public
EntityKey
EntityKey
94
EntityKey
attachedKey = null;
130
EntityKey
ownerKey = WrappedOwner.EntityKey;
159
internal void SetEntityKey(
EntityKey
value, bool forceFixup)
238
EntityKey
ownerKey = ValidateOwnerWithRIConstraints(targetEntry == null ? null : targetEntry.WrappedEntity, value, checkBothEnds: true);
325
internal
EntityKey
AttachedEntityKey
334
internal
EntityKey
DetachedEntityKey
346
internal
EntityKey
CachedForeignKey
354
internal void SetCachedForeignKey(
EntityKey
newForeignKey, EntityEntry source)
366
internal IEnumerable<
EntityKey
> GetAllKeyValues()
396
internal
EntityKey
ValidateOwnerWithRIConstraints(IEntityWrapper targetEntity,
EntityKey
targetEntityKey, bool checkBothEnds)
398
EntityKey
ownerKey = WrappedOwner.EntityKey;
565
internal void UpdateForeignKeyValues(IEntityWrapper dependentEntity,
EntityKey
principalKey)
647
EntityKey
foreignKey = ForeignKeyFactory.CreateKeyFromForeignKeyValues(entry, this);
719
EntityKey
realKey = CachedForeignKey;
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (5)
194
EntityKey
sourceKey = WrappedOwner.EntityKey;
362
EntityKey
ownerKey = WrappedOwner.EntityKey;
434
EntityKey
ownerKey = WrappedOwner.EntityKey;
437
new KeyValuePair<string,
EntityKey
>(RelationshipNavigation.From, ownerKey),
438
new KeyValuePair<string,
EntityKey
>(RelationshipNavigation.To, DetachedEntityKey));
System\Data\Objects\DataClasses\IEntityWithKey.cs (1)
27
EntityKey
EntityKey { get; set; }
System\Data\Objects\DataClasses\RelatedEnd.cs (31)
384
EntityKey
key = _wrappedOwner.EntityKey;
797
EntityKey
sourceKey = _wrappedOwner.EntityKey;
1138
EntityKey
key = wrappedTarget.EntityKey;
1645
EntityKey
targetKey = wrappedEntity.EntityKey;
1783
EntityKey
entityKey = wrappedEntity.EntityKey;
1784
EntityKey
ownerKey = _wrappedOwner.EntityKey;
1786
new KeyValuePair<string,
EntityKey
>(_navigation.From, ownerKey),
1787
new KeyValuePair<string,
EntityKey
>(_navigation.To, entityKey));
1811
EntityKey
principalKey;
1848
EntityKey
detachedKey = ((EntityReference)this).DetachedEntityKey;
1888
private
EntityKey
ExtractPrincipalKey(IEntityWrapper wrappedRelatedEntity)
1893
EntityKey
principalKey = wrappedRelatedEntity.EntityKey;
1909
internal static bool VerifyRIConstraintsWithRelatedEntry(ReferentialConstraint constraint, Func<string, object> getDependentPropertyValue,
EntityKey
principalKey)
2123
EntityKey
targetKey = wrappedEntity.EntityKey;
2154
EntityKey
ownerKey = _wrappedOwner.EntityKey;
2155
EntityKey
entityKey = wrappedEntity.EntityKey;
2161
new KeyValuePair<string,
EntityKey
>(_navigation.From, ownerKey),
2162
new KeyValuePair<string,
EntityKey
>(_navigation.To, entityKey)),
2244
EntityKey
ownerKey = wrappedOwner.EntityKey;
2245
EntityKey
entityKey = wrappedEntity.EntityKey;
2248
new KeyValuePair<string,
EntityKey
>(navigation.From, ownerKey),
2249
new KeyValuePair<string,
EntityKey
>(navigation.To, entityKey));
2259
EntityKey
ownerKey = wrappedOwner.EntityKey;
2260
EntityKey
entityKey = wrappedEntity.EntityKey;
2262
new KeyValuePair<string,
EntityKey
>(navigation.From, ownerKey),
2263
new KeyValuePair<string,
EntityKey
>(navigation.To, entityKey));
2299
EntityKey
ownerKey = _wrappedOwner.EntityKey;
2390
EntityKey
detachedKey = entityRef.DetachedEntityKey;
2521
internal static bool IsValidEntityKeyType(
EntityKey
entityKey)
2524
Object.ReferenceEquals(
EntityKey
.EntityNotValidKey, entityKey) ||
2525
Object.ReferenceEquals(
EntityKey
.NoEntitySetKey, entityKey));
System\Data\Objects\DataClasses\RelationshipManager.cs (3)
809
EntityKey
ownerKey = null;
1228
EntityKey
ownerKey = wrappedOwner.EntityKey;
1438
EntityKey
ownerKey = wrappedOwner.EntityKey;
System\Data\Objects\ELinq\MethodCallTranslator.cs (1)
759
if (clrReturnType != typeof(
EntityKey
))
System\Data\Objects\EntityEntry.cs (29)
25
private
EntityKey
_entityKey; // !null if IsKeyEntry or Entity
59
internal EntityEntry(IEntityWrapper wrappedEntity,
EntityKey
entityKey, EntitySet entitySet, ObjectStateManager cache,
101
internal EntityEntry(
EntityKey
entityKey, EntitySet entitySet, ObjectStateManager cache, StateManagerTypeMetadata typeMetadata)
141
override public
EntityKey
EntityKey
721
internal void UpdateRelationshipEnds(
EntityKey
oldKey, EntityEntry promotedEntry)
1707
Dictionary<RelatedEnd, HashSet<
EntityKey
>> keys;
2337
Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<
EntityKey
>>> relationships,
2338
Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<
EntityKey
>>> principalRelationships,
2339
EntityKey
relatedKey,
2352
EntityKey
permanentKeyOwner = this.ObjectStateManager.GetPermanentKey(relatedEntry.WrappedEntity, relatedEndTo, this.WrappedEntity);
2445
EntityKey
key = _entityKey;
2556
EntityKey
targetKey = relationshipEntry.RelationshipWrapper.GetOtherEntityKey(EntityKey);
2579
EntityKey
targetKey = relationshipEntry.RelationshipWrapper.GetOtherEntityKey(EntityKey);
2649
EntityKey
entityKey = relationshipEntry.GetCurrentRelationValue(i) as
EntityKey
;
3402
foreach(
EntityKey
foreignKey in relatedEnd.GetAllKeyValues())
3454
EntityKey
foreignKey = ForeignKeyFactory.CreateKeyFromForeignKeyValues(this, reference);
3465
EntityKey
existingPrincipalKey = existingPrincipal.EntityKey;
3519
internal void FixupEntityReferenceToPrincipal(EntityReference relatedEnd,
EntityKey
foreignKey, bool setIsLoaded, bool replaceExistingRef)
3652
internal bool TryGetReferenceKey(AssociationEndMember principalRole, out
EntityKey
principalKey)
3739
EntityKey
principalKey = reference.EntityKey;
3754
EntityKey
principalKey = WrappedEntity.EntityKey;
3832
out Dictionary<RelatedEnd, HashSet<
EntityKey
>> relatedEntities,
3859
EntityKey
foreignKey = ForeignKeyFactory.CreateKeyFromForeignKeyValues(this, constraint, principalEntitySet, useOriginalValues);
3866
HashSet<
EntityKey
> entityKeys;
3867
relatedEntities = relatedEntities != null ? relatedEntities : new Dictionary<RelatedEnd, HashSet<
EntityKey
>>();
3870
entityKeys = new HashSet<
EntityKey
>();
3914
EntityKey
currentKey = ForeignKeyFactory.CreateKeyFromForeignKeyValues(this, entityReference);
3915
EntityKey
originalKey = entityReference.CachedForeignKey;
System\Data\Objects\FieldDescriptor.cs (1)
67
result = typeof(
EntityKey
);
System\Data\Objects\Internal\BaseEntityWrapper.cs (2)
216
public abstract
EntityKey
EntityKey { get; set; }
221
public abstract
EntityKey
GetEntityKeyFromEntity();
System\Data\Objects\Internal\EntityWithKeyStrategy.cs (3)
33
public
EntityKey
GetEntityKey()
39
public void SetEntityKey(
EntityKey
key)
45
public
EntityKey
GetEntityKeyFromEntity()
System\Data\Objects\Internal\EntityWrapper.cs (5)
41
internal EntityWrapperWithoutRelationships(TEntity entity,
EntityKey
key, EntitySet entitySet, ObjectContext context, MergeOption mergeOption, Type identityType,
102
internal EntityWrapperWithRelationships(TEntity entity,
EntityKey
key, EntitySet entitySet, ObjectContext context, MergeOption mergeOption, Type identityType,
194
protected EntityWrapper(TEntity entity, RelationshipManager relationshipManager,
EntityKey
key, EntitySet set, ObjectContext context, MergeOption mergeOption, Type identityType,
224
public override
EntityKey
EntityKey
238
public override
EntityKey
GetEntityKeyFromEntity()
System\Data\Objects\Internal\EntityWrapperFactory.cs (1)
49
internal static IEntityWrapper CreateNewWrapper(object entity,
EntityKey
key)
System\Data\Objects\Internal\ForeignKeyFactory.cs (9)
26
public static bool IsConceptualNullKey(
EntityKey
key)
44
public static bool IsConceptualNullKeyChanged(
EntityKey
conceptualNullKey,
EntityKey
realKey)
53
return !
EntityKey
.InternalEquals(conceptualNullKey, realKey, compareEntitySets: false);
61
public static
EntityKey
CreateConceptualNullKey(
EntityKey
originalKey)
66
EntityKey
nullKey = new EntityKey(s_NullForeignKey, originalKey.EntityKeyValues);
77
public static
EntityKey
CreateKeyFromForeignKeyValues(EntityEntry dependentEntry, RelatedEnd relatedEnd)
94
public static
EntityKey
CreateKeyFromForeignKeyValues(EntityEntry dependentEntry, ReferentialConstraint constraint, EntitySet principalEntitySet, bool useOriginalValues)
System\Data\Objects\Internal\IEntityKeyStrategy.cs (3)
23
EntityKey
GetEntityKey();
29
void SetEntityKey(
EntityKey
key);
35
EntityKey
GetEntityKeyFromEntity();
System\Data\Objects\Internal\IEntityWrapper.cs (2)
55
EntityKey
EntityKey { get; set; }
61
EntityKey
GetEntityKeyFromEntity();
System\Data\Objects\Internal\LightweightEntityWrapper.cs (3)
56
internal LightweightEntityWrapper(TEntity entity,
EntityKey
key, EntitySet entitySet, ObjectContext context, MergeOption mergeOption, Type identityType)
84
public override
EntityKey
EntityKey
102
public override
EntityKey
GetEntityKeyFromEntity()
System\Data\Objects\Internal\NullEntityWrapper.cs (2)
78
public
EntityKey
EntityKey
91
public
EntityKey
GetEntityKeyFromEntity()
System\Data\Objects\Internal\PocoEntityKeyStrategy.cs (4)
22
private
EntityKey
_key;
32
public
EntityKey
GetEntityKey()
38
public void SetEntityKey(
EntityKey
key)
44
public
EntityKey
GetEntityKeyFromEntity()
System\Data\Objects\Internal\TransactionManager.cs (6)
116
internal Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<
EntityKey
>>> AddedRelationshipsByForeignKey
123
internal Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<
EntityKey
>>> AddedRelationshipsByPrincipalKey
130
internal Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<
EntityKey
>>> DeletedRelationshipsByForeignKey
307
this.DeletedRelationshipsByForeignKey = new Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<
EntityKey
>>>();
308
this.AddedRelationshipsByForeignKey = new Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<
EntityKey
>>>();
309
this.AddedRelationshipsByPrincipalKey = new Dictionary<IEntityWrapper, Dictionary<RelatedEnd, HashSet<
EntityKey
>>>();
System\Data\Objects\ObjectContext.cs (26)
535
EntityKey
key = existingEntry != null ? existingEntry.EntityKey : wrappedEntity.GetEntityKeyFromEntity();
703
EntityKey
key = wrappedEntity.GetEntityKeyFromEntity();
712
EntityEntry entry = this.ObjectStateManager.AddEntry(wrappedEntity, (
EntityKey
)null, entitySet, argumentName, true);
898
EntityKey
key = wrappedEntity.EntityKey;
943
EntityKey
key = wrappedOriginalEntity.EntityKey;
1104
EntityKey
key = wrappedEntity.GetEntityKeyFromEntity();
1211
public
EntityKey
CreateEntityKey(string entitySetName, object entity)
1239
private void AddRefreshKey(object entityLike, Dictionary<
EntityKey
, EntityEntry> entities, Dictionary<EntitySet, List<
EntityKey
>> currentKeys)
1248
EntityKey
key = wrappedEntity.EntityKey;
1255
List<
EntityKey
> setKeys = null;
1258
setKeys = new List<
EntityKey
>();
1934
public object GetObjectByKey(
EntityKey
key)
2016
Dictionary<
EntityKey
, EntityEntry> entities,
2017
object entity,
EntityKey
key)
2058
Dictionary<
EntityKey
, EntityEntry> entities = new Dictionary<
EntityKey
, EntityEntry>(RefreshEntitiesSize(collection));
2061
Dictionary<EntitySet, List<
EntityKey
>> refreshKeys = new Dictionary<EntitySet, List<
EntityKey
>>();
2082
List<
EntityKey
> setKeys = refreshKeys[targetSet];
2099
foreach (KeyValuePair<
EntityKey
, EntityEntry> item in entities)
2129
foreach (KeyValuePair<
EntityKey
, EntityEntry> item in entities)
2162
private int BatchRefreshEntitiesByKey(RefreshMode refreshMode, Dictionary<
EntityKey
, EntityEntry> trackedEntities, EntitySet targetSet, List<
EntityKey
> targetKeys, int startFrom)
2255
EntityKey
key = wrappedEntity.EntityKey;
2468
public bool TryGetObjectByKey(
EntityKey
key, out object value)
System\Data\Objects\ObjectStateEntry.cs (1)
105
abstract public
EntityKey
EntityKey { get; internal set; }
System\Data\Objects\ObjectStateManager.cs (86)
37
private Dictionary<
EntityKey
, EntityEntry> _addedEntityStore;
38
private Dictionary<
EntityKey
, EntityEntry> _modifiedEntityStore;
39
private Dictionary<
EntityKey
, EntityEntry> _deletedEntityStore;
40
private Dictionary<
EntityKey
, EntityEntry> _unchangedEntityStore;
68
private readonly Dictionary<
EntityKey
, HashSet<EntityEntry>> _danglingForeignKeys = new Dictionary<
EntityKey
, HashSet<EntityEntry>>();
276
internal EntityEntry AddKeyEntry(
EntityKey
entityKey, EntitySet entitySet)
329
internal EntityEntry AddEntry(IEntityWrapper wrappedObject,
EntityKey
passedKey, EntitySet entitySet, string argumentName, bool isAdded)
338
EntityKey
entityKey = passedKey;
354
EntityKey
dataObjectEntityKey = null;
481
internal void AddEntryContainingForeignKeyToIndex(
EntityKey
foreignKey, EntityEntry entry)
531
internal void RemoveEntryFromForeignKeyIndex(
EntityKey
foreignKey, EntityEntry entry)
546
internal void RemoveForeignKeyFromIndex(
EntityKey
foreignKey)
557
internal IEnumerable<EntityEntry> GetNonFixedupEntriesContainingForeignKey(
EntityKey
foreignKey)
941
EntityKey
targetKey = wrappedRelatedEntity.EntityKey;
968
internal static int UpdateRelationships(ObjectContext context, MergeOption mergeOption, AssociationSet associationSet, AssociationEndMember sourceMember,
EntityKey
sourceKey, IEntityWrapper wrappedSource, AssociationEndMember targetMember, IList targets, bool setIsLoaded)
1016
EntityKey
targetKey = wrappedTarget.EntityKey;
1107
EntityKey
sourceKey, AssociationEndMember sourceMember)
1163
internal static bool TryUpdateExistingRelationships(ObjectContext context, MergeOption mergeOption, AssociationSet associationSet, AssociationEndMember sourceMember,
EntityKey
sourceKey, IEntityWrapper wrappedSource, AssociationEndMember targetMember,
EntityKey
targetKey, bool setIsLoaded, out EntityState newEntryState)
1387
private static void UnloadReferenceRelatedEnds(ObjectStateManager cache, RelationshipEntry relationshipEntry,
EntityKey
sourceEntityKey, string targetRoleName)
1408
internal EntityEntry AttachEntry(
EntityKey
entityKey, IEntityWrapper wrappedObject, EntitySet entitySet, string argumentName)
1454
private void CheckKeyMatchesEntity(IEntityWrapper wrappedEntity,
EntityKey
entityKey, EntitySet entitySetForType, bool forAttach)
1570
private void AddRelationshipEndToLookup(
EntityKey
key, RelationshipEntry relationship)
1595
private void DeleteRelationshipEndFromLookup(
EntityKey
key, RelationshipEntry relationship)
1606
KeyValuePair<string,
EntityKey
> roleAndKey1,
1607
KeyValuePair<string,
EntityKey
> roleAndKey2)
1631
KeyValuePair<string,
EntityKey
> roleAndKey1,
1632
KeyValuePair<string,
EntityKey
> roleAndKey2)
1658
internal RelationshipEntry[] CopyOfRelationshipsByKey(
EntityKey
key)
1667
internal EntityEntry.RelationshipEndEnumerable FindRelationshipsByKey(
EntityKey
key)
1672
IEnumerable<IEntityStateEntry> IEntityStateManager.FindRelationshipsByKey(
EntityKey
key)
1712
Dictionary<
EntityKey
, EntityEntry>[] stores = { _unchangedEntityStore, _modifiedEntityStore, _addedEntityStore, _deletedEntityStore };
1713
foreach (Dictionary<
EntityKey
, EntityEntry> store in stores)
1928
private void GetEntityEntriesForDetectChanges(Dictionary<
EntityKey
, EntityEntry> entityStore, ref List<EntityEntry> entries)
1963
EntityKey
oldKey = entry.EntityKey;
1980
EntityKey
newKey;
2072
EntityKey
oldKey = entry.EntityKey;
2076
EntityKey
newKey = new EntityKey(entry.EntitySet);
2112
private void ResetEntityKey(EntityEntry entry,
EntityKey
value)
2118
EntityKey
entityKey = entry.WrappedEntity.EntityKey;
2161
EntityKey
key = entity as
EntityKey
;
2283
new KeyValuePair<string,
EntityKey
>(relatedEnd.SourceRoleName, sourceEntry.EntityKey),
2284
new KeyValuePair<string,
EntityKey
>(relatedEnd.TargetRoleName, targetEntry.EntityKey));
2393
EntityKey
key = o as
EntityKey
;
2417
IEntityStateEntry IEntityStateManager.GetEntityStateEntry(
EntityKey
key)
2427
public ObjectStateEntry GetObjectStateEntry(
EntityKey
key)
2437
internal EntityEntry GetEntityEntry(
EntityKey
key)
2489
EntityKey
entityKey = entity as
EntityKey
;
2507
bool IEntityStateManager.TryGetEntityStateEntry(
EntityKey
key, out IEntityStateEntry entry)
2530
bool IEntityStateManager.TryGetReferenceKey(
EntityKey
dependentKey, AssociationEndMember principalRole, out
EntityKey
principalKey)
2546
public bool TryGetObjectStateEntry(
EntityKey
key, out ObjectStateEntry entry)
2555
internal bool TryGetEntityEntry(
EntityKey
key, out EntityEntry entry)
2574
internal EntityEntry FindEntityEntry(
EntityKey
key)
2591
Debug.Assert(!(entity is
EntityKey
), "Object is a EntityKey instead of raw entity.");
2597
EntityKey
entityEntityKey = entityWithKey.EntityKey;
2800
Dictionary<
EntityKey
, EntityEntry> dictionaryToAdd = null;
2806
_unchangedEntityStore = new Dictionary<
EntityKey
, EntityEntry>();
2814
_addedEntityStore = new Dictionary<
EntityKey
, EntityEntry>();
2822
_deletedEntityStore = new Dictionary<
EntityKey
, EntityEntry>();
2830
_modifiedEntityStore = new Dictionary<
EntityKey
, EntityEntry>();
2915
Dictionary<
EntityKey
, EntityEntry> dictionaryContainingEntry = null;
3124
Dictionary<RelatedEnd, HashSet<
EntityKey
>> addedRelationshipsByForeignKey;
3204
HashSet<
EntityKey
> newFks = null;
3212
Dictionary<RelatedEnd, HashSet<
EntityKey
>> addedRelationshipsByPrincipalKey;
3223
EntityKey
addedKey = GetPermanentKey(entry.WrappedEntity, reference, addedEntity);
3236
Dictionary<RelatedEnd, HashSet<
EntityKey
>> deletedRelationshipsByForeignKey;
3239
HashSet<
EntityKey
> removedKeys;
3287
internal
EntityKey
GetPermanentKey(IEntityWrapper entityFrom, RelatedEnd relatedEndFrom, IEntityWrapper entityTo)
3289
EntityKey
entityKey = null;
3347
HashSet<
EntityKey
> entityKeysOfAddedObjects = null;
3349
Dictionary<RelatedEnd, HashSet<
EntityKey
>> addedRelationshipsByForeignKey;
3374
foreach (
EntityKey
entityKeyOfAddedObjects in entityKeysOfAddedObjects)
3473
HashSet<
EntityKey
> entityKeysOfDeletedObjects = null;
3475
Dictionary<RelatedEnd, HashSet<
EntityKey
>> deletedRelationshipsByForeignKey;
3495
foreach (
EntityKey
key in entityKeysOfDeletedObjects)
3515
EntityKey
permanentRelatedKey = new EntityKey((EntitySet)relatedEntry.EntitySet, (IExtendedDataRecord)relatedEntry.CurrentValues);
3611
HashSet<
EntityKey
> entityKeysOfDeletedObjects = null;
3612
Dictionary<RelatedEnd, HashSet<
EntityKey
>> deletedRelationshipsByForeignKey;
3664
HashSet<
EntityKey
> entityKeysOfAddedObjects = null;
3665
Dictionary<RelatedEnd, HashSet<
EntityKey
>> addedRelationshipsByForeignKey;
3715
internal
EntityKey
CreateEntityKey(EntitySet entitySet, object entity)
System\Data\Objects\RelationshipEntry.cs (14)
22
internal
EntityKey
Key0 { get { return RelationshipWrapper.Key0; } }
23
internal
EntityKey
Key1 { get { return RelationshipWrapper.Key1; } }
121
override public
EntityKey
EntityKey
297
return typeof(
EntityKey
); // this is given By Design
371
internal bool IsSameAssociationSetAndRole(AssociationSet associationSet, AssociationEndMember associationMember,
EntityKey
entityKey)
440
internal void ChangeRelatedEnd(
EntityKey
oldKey,
EntityKey
newKey)
465
EntityKey
entityKey = this.GetCurrentRelationValue(i, false) as
EntityKey
;
503
EntityEntry entry1 = _cache.GetEntityEntry((
EntityKey
)GetCurrentRelationValue(0));
505
EntityEntry entry2 = _cache.GetEntityEntry((
EntityKey
)GetCurrentRelationValue(1));
524
EntityKey
targetKey = null;
705
internal RelationshipEntry GetNextRelationshipEnd(
EntityKey
entityKey)
712
internal void SetNextRelationshipEnd(
EntityKey
entityKey, RelationshipEntry nextEnd)
System\Data\Objects\RelationshipWrapper.cs (12)
19
internal readonly
EntityKey
Key0;
20
internal readonly
EntityKey
Key1;
22
internal RelationshipWrapper(AssociationSet extent,
EntityKey
key)
32
internal RelationshipWrapper(RelationshipWrapper wrapper, int ordinal,
EntityKey
key)
44
KeyValuePair<string,
EntityKey
> roleAndKey1,
45
KeyValuePair<string,
EntityKey
> roleAndKey2)
51
string role0,
EntityKey
key0,
52
string role1,
EntityKey
key1)
87
internal AssociationEndMember GetAssociationEndMember(
EntityKey
key)
93
internal
EntityKey
GetOtherEntityKey(
EntityKey
key)
98
internal
EntityKey
GetEntityKey(int ordinal)
System\Data\Query\ResultAssembly\BridgeDataReader.cs (1)
198
result = typeof(
EntityKey
);
System.Data.Services (1)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (1)
2435
EntityKey
key = ((EntityReference)relatedEnd).EntityKey;
System.Web.Entity (5)
System\Data\WebControls\EntityDataSourceColumn.cs (1)
288
EntityKey
entityKey = this.Group.GetEntityKey(entity);
System\Data\WebControls\EntityDataSourceReferenceGroup.cs (4)
55
internal abstract
EntityKey
GetEntityKey(EntityDataSourceWrapper entity);
72
EntityKey
originalEntityKeys = reference.EntityKey;
125
internal override
EntityKey
GetEntityKey(EntityDataSourceWrapper entity)
127
EntityKey
key = GetRelatedReference(entity).EntityKey;