IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class > FirstOrNullEntity Method : FirstOrNullEntity<TEntity>(IQueryable<TEntity>) Method |
'Declaration
<ExtensionAttribute()> Public Overloads Shared Function FirstOrNullEntity(Of TEntity As Class)( _ ByVal source As IQueryable(Of TEntity) _ ) As TEntity
'Usage
Dim source As IQueryable(Of TEntity) Dim value As TEntity value = EntityQueryExtensions.FirstOrNullEntity(Of TEntity)(source)
[Extension()] public static TEntity FirstOrNullEntity<TEntity>( IQueryable<TEntity> source ) where TEntity: class
var mgr1 = new DomainModelEntityManager(); Customer cust = mgr1.Customers.Where(c => c.Country == "UK").FirstOrNullEntity();
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