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