1 implementation of IEntityWithKey
System.Data.Entity (1)
System\Data\Objects\DataClasses\EntityObject.cs (1)
22public abstract class EntityObject : StructuralObject, IEntityWithKey, IEntityWithChangeTracker, IEntityWithRelationships
24 references to IEntityWithKey
System.Data.Entity (24)
System\Data\Common\Internal\Materialization\Translator.cs (4)
554private static readonly MethodInfo IEntityKeyWithKey_EntityKey = typeof(System.Data.Objects.DataClasses.IEntityWithKey).GetProperty("EntityKey").GetSetMethod(); 597private static readonly ConstructorInfo EntityWithKeyStrategy_ctor = typeof(EntityWithKeyStrategy).GetConstructor(new Type[] { typeof(IEntityWithKey) }); 760bool isIEntityWithKey = typeof(IEntityWithKey).IsAssignableFrom(actualType); 1255if (typeof(IEntityWithKey).IsAssignableFrom(actualType) && MergeOption.AppendOnly != _mergeOption)
System\Data\Metadata\MetadataWorkspace.cs (1)
452ImplicitLoadAssemblyForType(typeof(System.Data.Objects.DataClasses.IEntityWithKey), callingAssembly);
System\Data\Objects\Internal\EntityWithKeyStrategy.cs (2)
21private IEntityWithKey _entity; 27public EntityWithKeyStrategy(IEntityWithKey entity)
System\Data\Objects\Internal\EntityWrapperFactory.cs (6)
87bool isIEntityWithKey = typeof(IEntityWithKey).IsAssignableFrom(entityType); 110where TEntity : IEntityWithRelationships, IEntityWithKey, IEntityWithChangeTracker 146bool isIEntityWithKey = typeof(IEntityWithKey).IsAssignableFrom(entityType); 280IEntityWithKey withKey = entity as IEntityWithKey; 351return (object entity) => new EntityWithKeyStrategy((IEntityWithKey)entity);
System\Data\Objects\Internal\LightweightEntityWrapper.cs (3)
24where TEntity : IEntityWithRelationships, IEntityWithKey, IEntityWithChangeTracker 38Debug.Assert(entity is IEntityWithKey, "LightweightEntityWrapper only works with entities that implement IEntityWithKey"); 61Debug.Assert(entity is IEntityWithKey, "LightweightEntityWrapper only works with entities that implement IEntityWithKey");
System\Data\Objects\ObjectContext.cs (1)
1076public void Attach(IEntityWithKey entity)
System\Data\Objects\ObjectStateManager.cs (7)
1688Debug.Assert(!(entry.Entity is IEntityWithKey), "_keylessEntityStore contains an entry that implement IEntityWithKey"); 1720!(entry.Entity is IEntityWithKey)) 1745Debug.Assert(!(entity is IEntityWithKey)); 2593IEntityWithKey entityWithKey = entity as IEntityWithKey; 2851if (null != entry.Entity && !(entry.Entity is IEntityWithKey)) 2963if (null != wrappedEntity && null != wrappedEntity.Entity && !(wrappedEntity.Entity is IEntityWithKey))