IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityManager Class > EntityManager Constructor : EntityManager Constructor(EntityManager,EntityManagerContext) |
'Declaration
Public Function New( _ ByVal entityManager As EntityManager, _ Optional ByVal entityManagerContext As EntityManagerContext _ )
'Usage
Dim entityManager As EntityManager Dim entityManagerContext As EntityManagerContext Dim instance As New EntityManager(entityManager, entityManagerContext)
public EntityManager( EntityManager entityManager, EntityManagerContext entityManagerContext )
Exception | Description |
---|---|
System.ArgumentNullException | entityManager is null |
IdeaBlade.Core.IdeaBladeException | Thrown for miscellaneous initialization failures |
EntityServerException | Thrown for connection failures |
System.ArgumentException | Thrown in a Silverlight application when BOS is not specified |
The VerifierEngine associated with this new EntityManager is determined by whether this ctor is called on the same thread as the entityManager passed in. If so, then the two entityManagers will share a single VerifierEngine, if not, a new VerifierEngine will be created for this entityManager. This behavior is intended to avoid threading issues because VeriferEngines ( like EntityManagers) are not thread safe.
Other than the login credentials and connection state, the settings copied from the source EntityManager are DefaultQueryStrategy, DefaultSaveOptions, DataSourceExtension, EntityServiceOption and VerifierEngine.
An EntityManagerCreated event is fired upon creation.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2