QueryableExtensionMethods.WithPath<TSource> Method (IQueryable<TSource>, Func<IPathEdgeRootParser<TSource>, IPathEdgeRootParser<TSource>>) |
Specifies a prefetch path with the path edges specified in the form of a chain of method calls using lambda expressions.
Namespace:
SD.LLBLGen.Pro.LinqSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.8.0.0 (5.8.21.0111)
Syntaxpublic static IQueryable<TSource> WithPath<TSource>(
this IQueryable<TSource> source,
Func<IPathEdgeRootParser<TSource>, IPathEdgeRootParser<TSource>> edgeSpecifierFunc
)
where TSource : IEntityCore
<ExtensionAttribute>
Public Shared Function WithPath(Of TSource As IEntityCore) (
source As IQueryable(Of TSource),
edgeSpecifierFunc As Func(Of IPathEdgeRootParser(Of TSource), IPathEdgeRootParser(Of TSource))
) As IQueryable(Of TSource)
Parameters
- source
- Type: System.Linq.IQueryable<TSource>
The source. - edgeSpecifierFunc
- Type: System.Func<IPathEdgeRootParser<TSource>, IPathEdgeRootParser<TSource>>
The edge specifier func.
Type Parameters
- TSource
- The type of the source.
Return Value
Type:
IQueryable<TSource>
An IQueryable(Of T) that has the specified path with the edges fetched as related entities, using prefetch paths.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IQueryable<TSource>. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Examples
(some query).WithPath(path=>path.Prefetch<OrderEntity>(c=>c.Order).Excluding(o=>o.RequiredDate, o=>o.ShippedDate);
See Also