IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class > Include Method : Include<T>(IEntityQuery<T>,Expression<Func<T,Object>>) Method |
'Declaration
<ExtensionAttribute()> Public Overloads Shared Function Include(Of T)( _ ByVal query As IEntityQuery(Of T), _ ByVal expr As Expression(Of Func(Of T,Object)) _ ) As IEntityQuery(Of T)
'Usage
Dim query As IEntityQuery(Of T) Dim expr As Expression(Of Func(Of T,Object)) Dim value As IEntityQuery(Of T) value = EntityQueryExtensions.Include(Of T)(query, expr)
[Extension()] public static IEntityQuery<T> Include<T>( IEntityQuery<T> query, Expression<Func<T,object>> expr )
// Query for some customers, and include their orders. var query1 = mgr.Customers .Where(c => c.Country == "UK") .Include(c=> c.OrderSummaries); foreach (Customer c in query1) { Console.WriteLine("order count = " + c.OrderSummaries.Count); }
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