Analyzes the FromClauseBase.FromExpression of a FromClauseBase and returns a SqlTableBase that represents the data source of the FromClauseBase.
Наследование: SqlPreparationExpressionVisitor, IUnresolvedSqlExpressionVisitor
        public static FromExpressionInfo AnalyzeFromExpression(
            Expression fromExpression,
            ISqlPreparationStage stage,
            UniqueIdentifierGenerator generator,
            IMethodCallTransformerProvider provider,
            ISqlPreparationContext context,
            Func <ITableInfo, SqlTable> tableGenerator)
        {
            ArgumentUtility.CheckNotNull("fromExpression", fromExpression);
            ArgumentUtility.CheckNotNull("stage", stage);
            ArgumentUtility.CheckNotNull("generator", generator);
            ArgumentUtility.CheckNotNull("provider", provider);
            ArgumentUtility.CheckNotNull("context", context);

            var visitor = new SqlPreparationFromExpressionVisitor(generator, stage, provider, context, tableGenerator);

            visitor.VisitExpression(fromExpression);
            if (visitor.FromExpressionInfo != null)
            {
                return(visitor.FromExpressionInfo.Value);
            }

            var message = string.Format(
                "Error parsing expression '{0}'. Expressions of type '{1}' cannot be used as the SqlTables of a from clause.",
                FormattingExpressionTreeVisitor.Format(fromExpression),
                fromExpression.Type.Name);

            throw new NotSupportedException(message);
        }
    public static FromExpressionInfo AnalyzeFromExpression (
        Expression fromExpression,
        ISqlPreparationStage stage,
        UniqueIdentifierGenerator generator,
        IMethodCallTransformerProvider provider,
        ISqlPreparationContext context,
        Func<ITableInfo, SqlTable> tableGenerator)
    {
      ArgumentUtility.CheckNotNull ("fromExpression", fromExpression);
      ArgumentUtility.CheckNotNull ("stage", stage);
      ArgumentUtility.CheckNotNull ("generator", generator);
      ArgumentUtility.CheckNotNull ("provider", provider);
      ArgumentUtility.CheckNotNull ("context", context);

      var visitor = new SqlPreparationFromExpressionVisitor (generator, stage, provider, context, tableGenerator);
      visitor.VisitExpression (fromExpression);
      if (visitor.FromExpressionInfo != null)
        return visitor.FromExpressionInfo.Value;

      var message = string.Format (
          "Error parsing expression '{0}'. Expressions of type '{1}' cannot be used as the SqlTables of a from clause.",
          FormattingExpressionTreeVisitor.Format (fromExpression),
          fromExpression.Type.Name);
      throw new NotSupportedException (message);
    }
 public virtual FromExpressionInfo PrepareFromExpression(
     Expression fromExpression,
     ISqlPreparationContext context,
     Func <ITableInfo, SqlTable> tableGenerator)
 {
     return(SqlPreparationFromExpressionVisitor.AnalyzeFromExpression(
                fromExpression, this, _uniqueIdentifierGenerator, _methodCallTransformerProvider, context, tableGenerator));
 }