Class NavigationQueryBuilder<TSource, TTarget>
Fluent builder for a navigation (foreign-key join) view: tracks TSource entities whose
FK-referenced TTarget satisfies the accumulated predicates. Call Where(Expression<Func<TSource, TTarget, bool>>) one or
more times, then ToView(int, string, int, string) to materialize a live NavigationView<TSource, TTarget>.
public class NavigationQueryBuilder<TSource, TTarget> where TSource : unmanaged where TTarget : unmanaged
Type Parameters
TSourceSource component holding the foreign-key field.
TTargetTarget component referenced by the foreign key.
- Inheritance
-
NavigationQueryBuilder<TSource, TTarget>
- Inherited Members
Methods
ToView(int, string, int, string)
Builds and registers a live NavigationView<TSource, TTarget> from the accumulated predicates, populates its initial entity set, and returns it. At least one target predicate is required so target-side changes stay tracked.
public ViewBase ToView(int bufferCapacity = 4096, string callerFile = null, int callerLine = 0, string callerMethod = null)
Parameters
bufferCapacityintDelta ring-buffer capacity for the view (power of two).
callerFilestringAutomatically captured source file of the call site; do not pass explicitly.
callerLineintAutomatically captured source line of the call site; do not pass explicitly.
callerMethodstringAutomatically captured calling member name; do not pass explicitly.
Returns
- ViewBase
The registered navigation view, populated with the current matching source entities.
Exceptions
- InvalidOperationException
No predicate was specified, no target predicate was specified, a referenced component is unregistered, or the FK field is missing / not marked
[ForeignKey]/ lacks an[Index(AllowMultiple = true)].
Where(Expression<Func<TSource, TTarget, bool>>)
Adds a predicate over source and target fields. The expression may reference both TSource and
TTarget fields; each comparison is routed to the matching component's predicate set.
public NavigationQueryBuilder<TSource, TTarget> Where(Expression<Func<TSource, TTarget, bool>> predicate)
Parameters
predicateExpression<Func<TSource, TTarget, bool>>Boolean expression over a source and a target component instance.
Returns
- NavigationQueryBuilder<TSource, TTarget>
This builder, for chaining.