src/Shared/EntityFramework.SqlServer/SqlGen/TopClause.cs
// <summary>
// Write out the TOP part of sql select statement
// It basically writes TOP (X) [WITH TIES].
// The brackets around X are ommited for Sql8.
// </summary>
Write out the TOP part of sql select statement
It basically writes TOP (X) [WITH TIES].
The brackets around X are ommited for Sql8.
Write out the TOP part of sql select statement It basically writes TOP ( X ) [ WITH TIES ] . The brackets around X are ommited for Sql8 .
public void WriteSql(SqlWriter writer, SqlGenerator sqlGenerator)
        {
            writer.Write("TOP ");
            if (sqlGenerator.SqlVersion
                != SqlVersion.Sql8)
            {
                writer.Write("(");
            }
            TopCount.WriteSql(writer, sqlGenerator);
            if (sqlGenerator.SqlVersion
                != SqlVersion.Sql8)
            {
                writer.Write(")");
            }
            writer.Write(" ");
            if (WithTies)
            {
                writer.Write("WITH TIES ");
            }
        }
public void WriteSql ( SqlWriter writer , SqlGenerator sqlGenerator ) { writer . Write ( " " ) ; if ( sqlGenerator . SqlVersion != SqlVersion . Sql8 ) { writer . Write ( " " ) ; } TopCount . WriteSql ( writer , sqlGenerator ) ; if ( sqlGenerator . SqlVersion != SqlVersion . Sql8 ) { writer . Write ( " " ) ; } writer . Write ( " " ) ; if ( WithTies ) { writer . Write ( " " ) ; } }
Write out the TOP part of sql select statement
It basically writes TOP (X) [WITH TIES].
Write out the TOP part of sql select statement It basically writes TOP ( X ) [ WITH TIES ] .
writer
SqlWriter
sqlGenerator
SqlGenerator