public NavigationSelector(string name, Expression <Func <TEntity, TTarget> > getTargetExpression, SearchDescriptorBase <TTarget, TId> levelDescriptor) { this.Name = name; this.GetTargetExpression = getTargetExpression; this.ObjectDescriptor = levelDescriptor; }
public SearchDescriptorBase <TEntity, TId> AddNavigation <TTarget, TTargetId>(string name, SearchDescriptorBase <TTarget, TTargetId> levelDescriptor, Expression <Func <TEntity, TTarget> > getTargetExpression) where TTarget : class { var navigationProperty = new NavigationSelector <TEntity, TTarget, TTargetId>(name, getTargetExpression, levelDescriptor); this.Navigations[name] = navigationProperty; return(this); }