Visual Basic (Declaration) | |
---|---|
Public Function New( _ Optional ByVal shouldConnect As Boolean, _ Optional ByVal dataSourceExtension As String, _ Optional ByVal entityServiceOption As EntityServiceOption, _ Optional ByVal compositionContextName As String, _ Optional ByVal options As EntityManagerOptions, _ Optional ByVal serviceKey As String _ ) |
Visual Basic (Usage) | ![]() |
---|---|
Dim shouldConnect As Boolean Dim dataSourceExtension As String Dim entityServiceOption As EntityServiceOption Dim compositionContextName As String Dim options As EntityManagerOptions Dim serviceKey As String Dim instance As New EntityManagerContext(shouldConnect, dataSourceExtension, entityServiceOption, compositionContextName, options, serviceKey) |
C# | |
---|---|
public EntityManagerContext( bool shouldConnect, string dataSourceExtension, EntityServiceOption entityServiceOption, string compositionContextName, EntityManagerOptions options, string serviceKey ) |
C++/CLI | |
---|---|
public: EntityManagerContext( bool shouldConnect, String^ dataSourceExtension, EntityServiceOption entityServiceOption, String^ compositionContextName, EntityManagerOptions^ options, String^ serviceKey ) |
Parameters
- shouldConnect
- dataSourceExtension
- entityServiceOption
- compositionContextName
- options
- serviceKey
You can also choose whether a connection to the IdeaBlade.EntityModel.Server.EntityServer should be made now. If shouldConnect is true
you will not be able to catch any IdeaBlade.EntityModel.EntityServerException thrown due to connection problems in an EntityServerError handler since the handler will not yet be set; you should instead wrap the call in a try/catch. If shouldConnect is false
then you will need to call the Connect method when you are ready to begin communicating with the EntityServer.
Use the entityServiceOption to explicitly specify whether you will be using local or distributed data sources. By default the ObjectServer element in the IdeaBlade configuration file determines this, but if you need to use both local and distributed data sources within the same application you'll use the EntityServiceOption to indicate what the EntityManager will use. See the "Access Both Local and Remote Data Sources In the Same N-tier Application" topic in the DevForce Resource Center for more information.
You can also provide the name of the CompositionContext to be used to compose parts for runtime extensibility. By default if you don't provide a name the "default" context is used. See the CompositionContext for more information and sample usage.
Use the ServiceKey to specify the named serviceKey element indicating the address of the application server used by the EntityManager.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family