DevForce Help Reference
GetNullEntity(Type) Method


The Entity subtype of the "null" entity to retrieve
Returns a "null" entity of the specified entity type.
Syntax
'Declaration
 
Public Overloads Function GetNullEntity( _
   ByVal entityType As Type _
) As Object
'Usage
 
Dim instance As EntityManager
Dim entityType As Type
Dim value As Object
 
value = instance.GetNullEntity(entityType)
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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityManager Class
EntityManager Members
Overload List

Send Feedback