NPersistence Reference Guide

The EntityManagerFactory type exposes the following methods.

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