src/Shared/EntityFramework.SqlServerCompact/SqlGen/SqlBuilder.cs
// <summary>
// We delegate the writing of the fragment to the appropriate type.
// </summary>
We delegate the writing of the fragment to the appropriate type.
We delegate the writing of the fragment to the appropriate type .
public void WriteSql(SqlWriter writer, SqlGenerator sqlGenerator)
        {
            if (null != _sqlFragments)
            {
                foreach (var o in _sqlFragments)
                {
                    var str = (o as String);
                    if (null != str)
                    {
                        writer.Write(str);
                    }
                    else
                    {
                        var sqlFragment = (o as ISqlFragment);
                        if (null != sqlFragment)
                        {
                            sqlFragment.WriteSql(writer, sqlGenerator);
                        }
                        else
                        {
                            throw new InvalidOperationException();
                        }
                    }
                }
            }
        }
public void WriteSql ( SqlWriter writer , SqlGenerator sqlGenerator ) { if ( null != _sqlFragments ) { foreach ( var o in _sqlFragments ) { var str = ( o as String ) ; if ( null != str ) { writer . Write ( str ) ; } else { var sqlFragment = ( o as ISqlFragment ) ; if ( null != sqlFragment ) { sqlFragment . WriteSql ( writer , sqlGenerator ) ; } else { throw new InvalidOperationException ( ) ; } } } } }
We delegate the writing of the fragment to the appropriate type.
We delegate the writing of the fragment to the appropriate type .
writer
SqlWriter
sqlGenerator
SqlGenerator