static
(Shared
in Visual Basic) property that gets or sets a default EntityManager.
Visual Basic (Declaration) | |
---|---|
<ObsoleteAttribute("This property will be removed after January 1st 2012. To simulate its removal set EntityManager.DefaultManager to null explicitly.")> Public Shared Property DefaultManager As EntityManager |
Visual Basic (Usage) | ![]() |
---|---|
Dim value As EntityManager EntityManager.DefaultManager = value value = EntityManager.DefaultManager |
C# | |
---|---|
[ObsoleteAttribute("This property will be removed after January 1st 2012. To simulate its removal set EntityManager.DefaultManager to null explicitly.")] public static EntityManager DefaultManager {get; set;} |
C++/CLI | |
---|---|
[ObsoleteAttribute("This property will be removed after January 1st 2012. To simulate its removal set EntityManager.DefaultManager to null explicitly.")] public: static property EntityManager^ DefaultManager { EntityManager^ get(); void set ( EntityManager^ value); } |
Exception | Description |
---|---|
System.InvalidOperationException | Will be raised if this property is accessed on the EntityServer or if access has been explicitly disallowed by setting this value to null |
You can also set the EntityManager to be referenced as your DefaultManager. Once set, the EntityManager you've indicated will be returned as the "default".
When using DefaultManager without having first constructed an instance with the connection and data source extension of your choice, you lose the ability to catch and diagnose any connection problems to your EntityServer, since Connect is called implicitly.
Note: If you are using multiple EntityManagers in your application you may want to explicitly set this property. If an implicitly assigned EntityManager is no longer in use its memory will not be released as long as it is still referenced by this property.
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