System\Data\Common\CommandTrees\ExpressionBuilder\DbExpressionBuilder.cs (8)
1146public static DbRefExpression CreateRef(this EntitySet entitySet, IEnumerable<DbExpression> keyValues)
1162public static DbRefExpression CreateRef(this EntitySet entitySet, params DbExpression[] keyValues)
1180public static DbRefExpression CreateRef(this EntitySet entitySet, EntityType entityType, IEnumerable<DbExpression> keyValues)
1198public static DbRefExpression CreateRef(this EntitySet entitySet, EntityType entityType, params DbExpression[] keyValues)
1203private static DbRefExpression CreateRefExpression(EntitySet entitySet, IEnumerable<DbExpression> keyValues)
1210private static DbRefExpression CreateRefExpression(EntitySet entitySet, EntityType entityType, IEnumerable<DbExpression> keyValues)
1231public static DbRefExpression RefFromKey(this EntitySet entitySet, DbExpression keyRow)
1253public static DbRefExpression RefFromKey(this EntitySet entitySet, DbExpression keyRow, EntityType entityType)
System\Data\Common\Internal\Materialization\Translator.cs (11)
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),
919entitySetReader = Expression.Constant(null, typeof(EntitySet));
923entitySetReader = Expression.Constant(simpleEntityIdentity.EntitySet, typeof(EntitySet));
933EntitySet[] entitySets = discriminatedEntityIdentity.EntitySetMap;
939entitySetReader = Expression.Constant(null, typeof(EntitySet));
944Expression.Constant(entitySets[i], typeof(EntitySet)),
953entitySetReader = Emit_Shaper_GetState(entitySetStateSlotNumber, typeof(EntitySet));
990Expression.Equal(setEntitySetStateSlotValue, Expression.Constant(null, typeof(EntitySet))),
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (18)
33internal ForeignConstraint(AssociationSet i_fkeySet, EntitySet i_parentTable, EntitySet i_childTable,
58private EntitySet m_parentTable;
59private EntitySet m_childTable;
65internal EntitySet ParentTable
70internal EntitySet ChildTable
100Dictionary<string, EntitySet> endToExtents = new Dictionary<string, EntitySet>();
118EntitySet parentExtent = endToExtents[constraint.FromRole.Name];
119EntitySet childExtent = endToExtents[constraint.ToRole.Name];
309EntitySet parentSet = MetadataHelper.GetEntitySetAtEnd(assocSet, parentEnd);
427private bool CheckConstraintWhenOnlyParentMapped(Cell cell, EntitySet parentSet, AssociationSet assocSet, AssociationEndMember endMember,
499EntitySet endSet = MetadataHelper.GetEntitySetAtEnd(relationSet, parentEnd);
504EntitySet entitySet = FindEntitySetForColumnsMappedToEntityKeys(cells, ParentColumns);
530private static EntitySet FindEntitySetForColumnsMappedToEntityKeys(IEnumerable<Cell> cells, IEnumerable<MemberPath> tableColumns)
548EntitySet entitySet = cQuery.Extent as EntitySet;
572if (cell.CQuery.Extent is EntitySet)
System\Data\Objects\EntityEntry.cs (12)
59internal EntityEntry(IEntityWrapper wrappedEntity, EntityKey entityKey, EntitySet entitySet, ObjectStateManager cache,
101internal EntityEntry(EntityKey entityKey, EntitySet entitySet, ObjectStateManager cache, StateManagerTypeMetadata typeMetadata)
158foreach (var foreignKey in ((EntitySet)EntitySet).ForeignKeyDependents)
175foreach (var foreignKey in ((EntitySet)EntitySet).ForeignKeyPrincipals)
890return new EntityRecordInfo(metadata.DataRecordInfo, _entityKey, (EntitySet)EntitySet);
1587tmpTypeMetadata = _cache.GetOrAddStateManagerTypeMetadata(complexObject.GetType(), (EntitySet)this.EntitySet);
2092Debug.Assert(EntitySet is EntitySet, "Expect entity entries to have true entity sets.");
2093if (!((EntitySet)EntitySet).HasForeignKeyRelationships)
3472existingPrincipalKey = new EntityKey((EntitySet)existingPrincipalEntry.EntitySet, (IExtendedDataRecord)existingPrincipalEntry.CurrentValues);
3691EntitySet entitySet = EntitySet as EntitySet;
3858EntitySet principalEntitySet = MetadataHelper.GetEntitySetAtEnd(associationSet, principalEnd);
System\Data\Objects\Internal\EntityWrapper.cs (3)
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,
System\Data\Objects\ObjectContext.cs (38)
512private void VerifyRootForAdd(bool doAttach, string entitySetName, IEntityWrapper wrappedEntity, EntityEntry existingEntry, out EntitySet entitySet, out bool isNoOperation)
516EntitySet entitySetFromName = null;
533EntitySet entitySetFromKey = null;
634EntitySet entitySet;
697internal void AddSingleObject(EntitySet entitySet, IEntityWrapper wrappedEntity, string argumentName)
896EntitySet entitySet = this.GetEntitySetFromName(entitySetName);
941EntitySet entitySet = this.GetEntitySetFromName(entitySetName);
1015EntitySet entitySet;
1093internal void AttachSingleObject(IEntityWrapper wrappedEntity, EntitySet entitySet, string argumentName)
1223EntitySet entitySet = this.GetEntitySetFromName(entitySetName);
1228internal EntitySet GetEntitySetFromName(string entitySetName)
1239private void AddRefreshKey(object entityLike, Dictionary<EntityKey, EntityEntry> entities, Dictionary<EntitySet, List<EntityKey>> currentKeys)
1253EntitySet entitySet = key.GetEntitySet(this.MetadataWorkspace);
1274EntitySet entitySet = GetEntitySetForType(typeof(TEntity), "TEntity");
1284private EntitySet GetEntitySetForType(Type entityCLRType, string exceptionParameterName)
1286EntitySet entitySetForType = null;
1297EntitySet entitySetFromContainer = GetEntitySetFromContainer(entityContainer, entityCLRType, exceptionParameterName);
1327private EntitySet GetEntitySetFromContainer(EntityContainer container, Type entityCLRType, string exceptionParameterName)
1333EntitySet entitySet = null;
1346entitySet = (EntitySet)es;
1363EntitySet entitySet = GetEntitySetForNameAndType(entitySetName, typeof(TEntity), "TEntity");
1378private EntitySet GetEntitySetForNameAndType(string entitySetName, Type entityCLRType, string exceptionParameterName)
1381EntitySet entitySet = GetEntitySetFromName(entitySetName);
1709internal void DeleteObject(object entity, EntitySet expectedEntitySet)
1757internal void Detach(object entity, EntitySet expectedEntitySet)
1834internal EntitySet GetEntitySet(string entitySetName, string entityContainerName)
1853EntitySet entitySet = null;
1903private void ValidateEntitySet(EntitySet entitySet, Type entityType)
1938EntitySet entitySet = key.GetEntitySet(this.MetadataWorkspace);
2061Dictionary<EntitySet, List<EntityKey>> refreshKeys = new Dictionary<EntitySet, List<EntityKey>>();
2080foreach (EntitySet targetSet in refreshKeys.Keys)
2162private int BatchRefreshEntitiesByKey(RefreshMode refreshMode, Dictionary<EntityKey, EntityEntry> trackedEntities, EntitySet targetSet, List<EntityKey> targetKeys, int startFrom)
2491EntitySet entitySet = key.GetEntitySet(this.MetadataWorkspace);
2673private ObjectResult<TElement> CreateFunctionObjectResult<TElement>(EntityCommand entityCommand, ReadOnlyMetadataCollection<EntitySet> entitySets, EdmType[] edmTypes, MergeOption mergeOption)
2702internal ObjectResult<TElement> MaterializedDataRecord<TElement>(EntityCommand entityCommand, DbDataReader storeReader, int resultSetIndex, ReadOnlyMetadataCollection<EntitySet> entitySets, EdmType[] edmTypes, MergeOption mergeOption)
2712EntitySet entitySet = entitySets.Count > resultSetIndex ? entitySets[resultSetIndex] : null;
3156EntitySet entitySet = null;
System\Data\Objects\ObjectResult_TResultType.cs (4)
36private readonly EntitySet _singleEntitySet;
43internal ObjectResult(Shaper<T> shaper, EntitySet singleEntitySet, TypeUsage resultItemType)
48internal ObjectResult(Shaper<T> shaper, EntitySet singleEntitySet, TypeUsage resultItemType, bool readerOwned)
53internal ObjectResult(Shaper<T> shaper, EntitySet singleEntitySet, TypeUsage resultItemType, bool readerOwned, NextResultGenerator nextResultGenerator, Action<object, EventArgs> onReaderDispose)
System\Data\Objects\ObjectStateManager.cs (17)
276internal EntityEntry AddKeyEntry(EntityKey entityKey, EntitySet entitySet)
329internal EntityEntry AddEntry(IEntityWrapper wrappedObject, EntityKey passedKey, EntitySet entitySet, string argumentName, bool isAdded)
457if (!((EntitySet)newEntry.EntitySet).HasForeignKeyRelationships)
648StateManagerTypeMetadata typeMetadata = GetOrAddStateManagerTypeMetadata(wrappedEntity.IdentityType, (EntitySet)keyEntry.EntitySet);
669wrappedEntity.AttachContext(contextToAttach, (EntitySet)keyEntry.EntitySet, MergeOption.AppendOnly);
1408internal EntityEntry AttachEntry(EntityKey entityKey, IEntityWrapper wrappedObject, EntitySet entitySet, string argumentName)
1454private void CheckKeyMatchesEntity(IEntityWrapper wrappedEntity, EntityKey entityKey, EntitySet entitySetForType, bool forAttach)
1463EntitySet entitySetForKey = entityKey.GetEntitySet(this.MetadataWorkspace);
1969var entitySet = (EntitySet)entry.EntitySet;
1984newKey = new EntityKey((EntitySet)entry.EntitySet, (IExtendedDataRecord)entry.CurrentValues);
2973internal StateManagerTypeMetadata GetOrAddStateManagerTypeMetadata(Type entityType, EntitySet entitySet)
3013private StateManagerTypeMetadata AddStateManagerTypeMetadata(EntitySet entitySet, ObjectTypeMapping mapping)
3302private EntitySet GetEntitySetOfOtherEnd(IEntityWrapper entity, RelatedEnd relatedEnd)
3306EntitySet entitySet = associationSet.AssociationSetEnds[0].EntitySet;
3515EntityKey permanentRelatedKey = new EntityKey((EntitySet)relatedEntry.EntitySet, (IExtendedDataRecord)relatedEntry.CurrentValues);
3715internal EntityKey CreateEntityKey(EntitySet entitySet, object entity)
System\Data\Query\InternalTrees\ColumnMapFactory.cs (3)
33internal static CollectionColumnMap CreateFunctionImportStructuralTypeColumnMap(DbDataReader storeDataReader, FunctionImportMappingNonComposable mapping, int resultSetIndex, EntitySet entitySet, StructuralType baseStructuralType)
85internal static CollectionColumnMap CreateColumnMapFromReaderAndType(DbDataReader storeDataReader, EdmType edmType, EntitySet entitySet, Dictionary<string, FunctionImportReturnTypeStructuralTypeColumnRenameMapping> renameList)
215DbDataReader storeDataReader, EdmType edmType, EntitySet entitySet,