IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class > FirstOrNullEntity Method : FirstOrNullEntity(IEntityQuery) Method |
'Declaration
<ExtensionAttribute()> Public Overloads Shared Function FirstOrNullEntity( _ ByVal query As IEntityQuery _ ) As Object
'Usage
Dim query As IEntityQuery Dim value As Object value = EntityQueryExtensions.FirstOrNullEntity(query)
[Extension()] public static object FirstOrNullEntity( IEntityQuery query )
var mgr = new DomainModelEntityManager(); var query = new EntityKeyQuery(new EntityKey(typeof(Customer), 1)); Customer cust = query.With(mgr).FirstOrNullEntity() as Customer;
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