IdeaBlade DevForce 2010 Help Reference
DefaultManager Property
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityManager Class : DefaultManager Property



A static (Shared in Visual Basic) property that gets or sets a default EntityManager.

Syntax

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)Copy Code
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);
}

Exceptions

ExceptionDescription
System.InvalidOperationExceptionWill be raised if this property is accessed on the EntityServer or if access has been explicitly disallowed by setting this value to null

Remarks

DefaultManager provides an easy way of referencing your "default" EntityManager. If you have not explicitly constructed an EntityManager DefaultManager will implicitly call the default constructor upon first use. If you have constructed an EntityManager DefaultManager will return your first constructed instance.

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.

Requirements

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

See Also

© 2013 All Rights Reserved.