src/Shared/EntityFramework.SqlServer/SqlGen/Sql8ExpressionRewriter.cs
// <summary>
// The only entry point.
// Rewrites the given tree by replacing expressions that are not directly supported on SQL Server 2000
// with alterntive translations.
// </summary>
// <param name="originalTree"> The tree to rewrite </param>
// <returns> The new tree </returns>
The only entry point.
Rewrites the given tree by replacing expressions that are not directly supported on SQL Server 2000
with alterntive translations.
The only entry point . Rewrites the given tree by replacing expressions that are not directly supported on SQL Server 2000 with alterntive translations .
internal static DbQueryCommandTree Rewrite(DbQueryCommandTree originalTree)
        {
            DebugCheck.NotNull(originalTree);
            var rewriter = new Sql8ExpressionRewriter(originalTree.MetadataWorkspace);
            var newQuery = rewriter.VisitExpression(originalTree.Query);
#if DEBUG
            return new DbQueryCommandTree(originalTree.MetadataWorkspace, originalTree.DataSpace, newQuery);
#else
            return new DbQueryCommandTree(originalTree.MetadataWorkspace, originalTree.DataSpace, newQuery, validate: false);
#endif
        }
internal static DbQueryCommandTree Rewrite ( DbQueryCommandTree originalTree ) { DebugCheck . NotNull ( originalTree ) ; var rewriter = new Sql8ExpressionRewriter ( originalTree . MetadataWorkspace ) ; var newQuery = rewriter . VisitExpression ( originalTree . Query ) ; if DEBUG return new DbQueryCommandTree ( originalTree . MetadataWorkspace , originalTree . DataSpace , newQuery ) ; else return new DbQueryCommandTree ( originalTree . MetadataWorkspace , originalTree . DataSpace , newQuery , validate : false ) ; endif }
The only entry point.
The only entry point .
The new tree
The new tree
originalTree
DbQueryCommandTree
The tree to rewrite
The tree to rewrite