DevForce Help Reference
EntityManager Class Members
Properties  Methods  Events


The following tables list the members exposed by EntityManager.

Public Constructors
 NameDescription
Public ConstructorEntityManager ConstructorOverloaded.   
Top
Public Properties
 NameDescription
Public PropertyAuthenticationContextGets or sets the IdeaBlade.EntityModel.Security.IAuthenticationContext used by this EntityManager.  
Public PropertyAuthorizedThreadId The thread id that this EntityManager is authorized to execute on. An EntityManager can only execute on a single thread at one time.  
Public PropertyCacheStateManagerThe CacheStateManager that controls saving and restoring the state of this EntityManager's internal cache.  
Public PropertyCompositionContextReturns the CompositionContext used by this EntityManager.  
Public PropertyDataSourceExtension Gets the DataSourceExtension used with this EntityManager.  
Public PropertyDataSourceResolver Gets the DataSourceResolver used to map entity types to data sources and IdGenerators.  
Public PropertyDefaultEntityReferenceStrategy Sets the default EntityReferenceStrategy for all references within this EntityManager;  
Public PropertyDefaultQueryStrategyGets or sets the default QueryStrategy to use for all queries where the QueryStrategy is not set either by parameter or as part of the Query itself.  
Public PropertyDefaultSaveOptionsGets or sets the default options that will be used if no SaveOptions are passed to a SaveChanges method.  
Public PropertyEntityServiceOption Gets the EntityServiceOption used to determine whether to connect to a local or distributed Entity Service.  
Public PropertyIsClient Returns whether the EntityManager is running on the client or the server.  
Public PropertyIsConnected Returns whether the EntityManager is currently connected to an EntityServer.  
Public PropertyIsLoggedIn Returns whether this EntityManager is logged in to the EntityServer.  
Public PropertyMetadataStoreThe EntityMetadataStore for this manager.  
Public PropertyOptions Misc. set of options available to control various aspects of an EntityManager's behavior.  
Public PropertyQueryCache Gets the cache of previously executed queries.  
Public PropertySafeThreadingCheck Delegate to a method called by the EntityManager to determine if an operation can safely be performed on the current thread.  
Public PropertyServiceKey Gets the name of the serviceKey which defines the EntityServer address.  
Public PropertyTag Gets or sets a user-defined value for this EntityManager.  
Public PropertyUsesDistributedEntityService Gets whether this EntityManager uses a distributed Entity Service.  
Public PropertyVerifierEngineGets or sets the IdeaBlade.Validation.VerifierEngine shared by all entities within this EntityManager.  
Top
Public Methods
 NameDescription
Public MethodAcceptChanges Accept changes to all modified, deleted or added entities within the cache.  
Public MethodAddEntitiesAdds newly created entities to the EntityManager cache.  
Public MethodAddEntityAdds a newly created entity to the EntityManager cache.  
Public MethodAttachEntities Adds a collection of detached entities to this EntityManager and marks them with the specified EntityState. Throws an exception if an entity with the same key already exists in the manager or if the specified entities are not in a detached state.  
Public MethodAttachEntity Adds a detached entity to this EntityManager and marks it with the specified EntityState. Throws an exception if an entity with the same key already exists in the manager or if the specified entity is not in a detached state.  
Public MethodClear Resets the EntityManager to its initial "newed" state.  
Public MethodConnectConnect to the IdeaBlade.EntityModel.Server.EntityServer.  
Public MethodConnectAsyncOverloaded. ConnectAsync(CancellationToken) with System.Threading.CancellationToken.None  
Public MethodCreateEntityOverloaded. Create a new entity of the requested type.  
Public MethodDisconnectDisconnect from the IdeaBlade.EntityModel.Server.EntityServer.  
Public MethodEquals (Inherited from object)
Public MethodExecuteQueryOverloaded.  Executes the specified query.  
Public MethodExecuteQueryAsyncOverloaded.  Executes the specified query asynchronously.  
Public MethodExecuteQueryForObject Executes the specified query returning a scalar value.  
Public MethodExecuteQueryForObjectAsyncOverloaded.  Executes the specified scalar query asynchronously.  
Public MethodFindEntitiesOverloaded.  Find all entities in cache having the specified entity state(s).  
Public MethodFindEntityOverloaded. Finds the object in cache using the EntityKey provided.  
Public MethodFindEntityGraph Given any entity or entities in a graph, collects and retrieves all related entities in the graph. This is a cache-only operation.  
Public MethodForceIdFixup Force an immediate update of all auto-generated IDs.  
Public MethodForceIdFixupAsyncPerform an asynchronous ForceIdFixup operation.  
Public MethodGenerateIdGenerates a temporary ID for an IEntity. The temporary ID will be mapped to a real ID when SaveChanges is called.  
Public MethodGetEntityGroupOverloaded.  Returns the EntityGroup associated with a specific Entity subtype.  
Public MethodGetEntityGroupsCollection of all EntityGroups within the cache.  
Public MethodGetHashCode (Inherited from object)
Public MethodGetNullEntityOverloaded.  Returns a "null" entity of the specified entity type.  
Public MethodGetQueryOverloaded.  Return an EntityQuery to retrieve entities of the specified type.  
Public MethodGetType (Inherited from object)
Public MethodHasChanges Determines whether the EntityManager cache has any changes that have not yet been persisted to the backend data source.  
Public MethodImportEntities Import entities from another EntityManager into this one.  
Public MethodInvokeServerMethodOverloaded. Invokes the specified static (Shared in Visual Basic) method for execution on the server.  
Public MethodInvokeServerMethodAsyncOverloaded. Calls InvokeServerMethodAsync(ServerMethodDelegate,CancellationToken,Object[]) with System.Threading.CancellationToken.None  
Public MethodIsEntityLoaded Returns true if the Entity is in cache.  
Public MethodIsEntityType Determines if the specified type is an entity type.  
Public MethodRefetchEntitiesOverloaded.  Forces a collection of entities to be refetched from the backend data source.  
Public MethodRefetchEntitiesAsyncOverloaded.  Forces a collection of entities to be refetched from the backend data source.  
Public MethodRefetchEntity Forces an entity to be refetched from the backend data source.  
Public MethodRefetchEntityAsyncOverloaded. Calls RefetchEntityAsync(Object,MergeStrategy,CancellationToken) with System.Threading.CancellationToken.None  
Public MethodRejectChangesRolls back all Entity changes since the cache was created or the last SaveChanges call was made.  
Public MethodRemoveEntitiesOverloaded. Removes a collection of entities from the EntityManager cache.  
Public MethodRemoveEntityRemoves an IEntity from the EntityManager cache.  
Public MethodSaveChangesPersists all changed entities within the EntityManager cache to the backend data source using the SaveOptions specified.  
Public MethodSaveChangesAsyncPerform an asynchronous SaveChanges operation with the specified SaveOptions.  
Public MethodToString (Inherited from object)
Public MethodTryExecuteQueryOverloaded. Executes the specified query and returns a QueryResult.  
Public MethodTryExecuteQueryAsyncOverloaded. Executes the specified query asynchronously and returns a QueryResult.  
Public MethodTrySaveChangesPersists one or more selected Entities within the EntityManager cache to the backend data source using the SaveOptions specified.  
Public MethodTrySaveChangesAsyncPerform an asynchronous SaveChanges operation with the specified SaveOptions.  
Top
Protected Methods
 NameDescription
Protected MethodFinalize (Inherited from object)
Protected MethodMemberwiseClone (Inherited from object)
Protected MethodOnClearedRaises the Cleared event.  
Protected MethodOnConnectionStateChangedRaises the ConnectionStateChanged event.  
Protected Methodstatic (Shared in Visual Basic)OnEntityManagerCreatedRaises the EntityManagerCreated event.  
Protected MethodOnFetchingRaises the Fetching event.  
Protected MethodOnQueriedRaises the Queried event.  
Protected MethodOnQueryingRaises the Querying event.  
Protected MethodOnSavedRaises the Saved event.  
Protected MethodOnSavingRaises the Saving event.  
Top
Extension Methods
 NameDescription
Public Extension MethodConnectAsyncConnect to the IdeaBlade.EntityModel.Server.EntityServer asynchronously.
Public Extension MethodExecuteQueryAsyncOverloaded.  Execute a query asynchronously.
Public Extension MethodForceIdFixupAsyncPerform an asynchronous ForceIdFixup operation.
Public Extension MethodInvokeServerMethodAsyncOverloaded. Asynchronously invokes the specified static (Shared in Visual Basic) method for execution on the server.
Public Extension MethodRefetchEntitiesAsyncOverloaded.  Performs an asynchronous refetch of all entities with the specified EntityState(s) from the backend data source.
Public Extension MethodRefetchEntityAsync Perform an asynchronous refetch operation.
Public Extension MethodSaveChangesPersists one or more selected Entities within the EntityManager cache to the backend data source using the IdeaBlade.EntityModel.SaveOptions specified.
Public Extension MethodSaveChangesAsyncOverloaded. Perform an asynchronous SaveChanges operation.
Public Extension MethodSaveChangesAsyncPerform an asynchronous IdeaBlade.EntityModel.Compat.EntityManagerPartialSaveExtensions.SaveChanges(IdeaBlade.EntityModel.EntityManager,System.Collections.IEnumerable,IdeaBlade.EntityModel.SaveOptions) operation with the specified list of entities and IdeaBlade.EntityModel.SaveOptions.
Public Extension MethodTrySaveChangesPersists one or more selected Entities within the EntityManager cache to the backend data source using the IdeaBlade.EntityModel.SaveOptions specified.
Public Extension MethodTrySaveChangesAsyncPerform an asynchronous IdeaBlade.EntityModel.Compat.EntityManagerPartialSaveExtensions.SaveChanges(IdeaBlade.EntityModel.EntityManager,System.Collections.IEnumerable,IdeaBlade.EntityModel.SaveOptions) operation with the specified list of entities and IdeaBlade.EntityModel.SaveOptions.
Top
Public Events
 NameDescription
Public EventCleared Fired whenever this entityManager is cleared.  
Public EventConnectionStateChanged Fired when the connection state of the EntityManager changes.  
Public EventEntityChanged Fired whenever an entity's state has changed in any significant manner.  
Public EventEntityChanging Fired whenever an entity's state is changing in any significant manner.  
Public EventEntityManagerCreated Event fired whenever a new EntityManager is created.  
Public EventEntityServerErrorRaised when an error occurs while accessing the EntityServer or backend data source.  
Public EventFetching Occurs before the EntityManager fetches data from an EntityServer. This event will only occur if the query will not be satisfied out of the local cache.  
Public EventQueried Occurs after the EntityManager has completed processing of a query.  
Public EventQuerying Occurs before the EntityManager executes a query.  
Public EventSaved Occurs after the EntityManager has persisted changed entities.  
Public EventSaving Occurs when the EntityManager is preparing to save changes.  
Top
See Also

Reference

EntityManager Class
IdeaBlade.EntityModel Namespace
IEntity Interface
EntityQuery Class
PassthruEsqlQuery Class
StoredProcQuery Class

Send Feedback