IdeaBlade DevForce 2010 Help Reference
GetNullEntity(Type) Method
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityManager Class > GetNullEntity Method : GetNullEntity(Type) Method



entityType
The Entity subtype of the "null" entity to retrieve
Returns a "null" entity of the specified entity type.

Syntax

Visual Basic (Declaration) 
Public Overloads Function GetNullEntity( _
   ByVal entityType As Type _
) As Object
Visual Basic (Usage)Copy Code
Dim instance As EntityManager
Dim entityType As Type
Dim value As Object
 
value = instance.GetNullEntity(entityType)
C# 
public object GetNullEntity( 
   Type entityType
)
C++/CLI 
public:
Object^ GetNullEntity( 
   Type^ entityType
) 

Parameters

entityType
The Entity subtype of the "null" entity to retrieve

Return Value

A "null" entity of the specified Entity subtype

Remarks

The null entity is a sentinel object that looks and behaves, for the most part, like a real entity instance. Every entity class defines its own "null entity" instance. When a query method must return an entity and it has no valid entity instance to return, it returns the null entity for the requested entity type instead. When a relation property should return a related entity instance and there is no such instance, it will return a null entity instead.

Only one instance of a null entity exists for any given entity type. You may use IUpdateNullEntity to set custom defaults for the null entity. Use EntityAspect.IsNullEntity to test whether an entity is the null entity.

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.