NPersistence Reference Guide
Interface used to interact with the entity manager factory for the persistence unit.

When the application has finished using the entity manager factory, and/or at application shutdown, the application should close the entity manager factory. Once an EntityManagerFactory has been closed, all its entity managers are considered to be in the closed state.

Namespace: NPersistence
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)

Syntax

   
 C# 
public interface EntityManagerFactory

Members

      
 All Members  Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Close()()()()
Close the factory, releasing any resources that it holds. After a factory instance has been closed, all methods invoked on it will throw the InvalidOperationException, except for isOpen, which will return false. Once an EntityManagerFactory has been closed, all its entity managers are considered to be in the closed state. if the entity manager factory has been closed
CreateEntityManager()()()()
Create a new application-managed EntityManager. This method returns a new EntityManager instance each time it is invoked. The isOpen method will return true on the returned instance.

Return Value

entity manager instance if the entity manager factory has been closed
CreateEntityManager(Dictionary<(Of <<'(Object, Object>)>>))
Create a new application-managed EntityManager with the specified Map of properties. This method returns a new EntityManager instance each time it is invoked. The isOpen method will return true on the returned instance. properties for entity manager

Return Value

entity manager instance if the entity manager factory has been closed
GetCache()()()()
Access the cache that is associated with the entity manager factory (the "second level cache").

Return Value

instance of the Cache interface if the entity manager factory has been closed
GetPersistenceUnitUtil()()()()
Return interface providing access to utility methods for the persistence unit.

Return Value

PersistenceUnitUtil interface if the entity manager factory has been closed
GetProperties()()()()
Get the properties and associated values that are in effect for the entity manager factory. Changing the contents of the map does not change the configuration in effect.

Return Value

properties if the entity manager factory has been closed
IsOpen()()()()
Indicates whether the factory is open. Returns true until the factory has been closed.

Return Value

boolean indicating whether the factory is open

See Also