@@ -145,11 +145,10 @@ public partial class SchemaExport
145
145
return ExecuteAsync ( null , execute , true , exportOutput , cancellationToken ) ;
146
146
}
147
147
148
- private async Task ExecuteAsync ( Action < string > scriptAction , bool execute , bool throwOnError , TextWriter exportOutput ,
148
+ private async Task ExecuteInitializedAsync ( Action < string > scriptAction , bool execute , bool throwOnError , TextWriter exportOutput ,
149
149
DbCommand statement , string sql , CancellationToken cancellationToken = default ( CancellationToken ) )
150
150
{
151
151
cancellationToken . ThrowIfCancellationRequested ( ) ;
152
- await ( InitializeAsync ( cancellationToken ) ) . ConfigureAwait ( false ) ;
153
152
try
154
153
{
155
154
string formatted = formatter . Format ( sql ) ;
@@ -268,14 +267,14 @@ public async Task ExecuteAsync(Action<string> scriptAction, bool execute, bool j
268
267
{
269
268
for ( int i = 0 ; i < dropSQL . Length ; i ++ )
270
269
{
271
- await ( ExecuteAsync ( scriptAction , execute , false , exportOutput , statement , dropSQL [ i ] , cancellationToken ) ) . ConfigureAwait ( false ) ;
270
+ await ( ExecuteInitializedAsync ( scriptAction , execute , false , exportOutput , statement , dropSQL [ i ] , cancellationToken ) ) . ConfigureAwait ( false ) ;
272
271
}
273
272
274
273
if ( ! justDrop )
275
274
{
276
275
for ( int j = 0 ; j < createSQL . Length ; j ++ )
277
276
{
278
- await ( ExecuteAsync ( scriptAction , execute , true , exportOutput , statement , createSQL [ j ] , cancellationToken ) ) . ConfigureAwait ( false ) ;
277
+ await ( ExecuteInitializedAsync ( scriptAction , execute , true , exportOutput , statement , createSQL [ j ] , cancellationToken ) ) . ConfigureAwait ( false ) ;
279
278
}
280
279
}
281
280
}
0 commit comments