To determine whether you can immediately connect to a database use this EntityManager constructor:
Syntax
Visual Basic (Declaration)
Public Function New( _
ByVal shouldConnect As Boolean _
)
Visual Basic (Usage) Copy Code
Dim shouldConnect As Boolean
Dim instance As EntityManager(shouldConnect)
C#
public EntityManager(
bool shouldConnect
)
Parameters
shouldConnect
True if a connection to the EntityServer should be made.
Exceptions
Exception Description
IdeaBlade.Core.IdeaBladeException Thrown for miscellaneous initialization failures
EntityServerException Thrown for connection failures
ArgumentException Thrown in a Silverlight application when BOS is not specified
Once you have created an EntityManager, you can check the IsConnected property of the EntityManager:
IsConnected Returns whether the EntityManager is currently connected to an EntityServer.