/// <summary>Creates a new DynamicQuery which wraps the specified TableValuedFunction call</summary> /// <param name="toWrap">The table valued function call to wrap.</param> /// <returns>toWrap wrapped in a DynamicQuery.</returns> public DynamicQuery Create(TableValuedFunctionCall toWrap) { return(this.Create().From(new TvfCallWrapper(toWrap)).Select(toWrap.GetFieldsAsArray().Select(f => this.Field(toWrap.Alias, f.Alias)).ToArray())); }
public override bool WriteTableValuedFunctionCall(TableValuedFunctionCall node) { if (ResolveNames) { Writer.Write(GetResolvedTableName(node.TableReference)); return false; } else { return true; } }