When I try to generate the migration script, and my solution is configured to use the SqlAzureExecutionStrategy, I get an exception.
I'm trying to run the following command:
Update-Database -SourceMigration 0 -Verbose -Script
If I were to run the same command without the -Script switch, the command works.
Stacktrace below:
```
System.InvalidOperationException: Streaming queries are not supported by the configured execution strategy 'SqlAzureExecutionStrategy'. See http://go.microsoft.com/fwlink/?LinkId=309381 for additional information.
at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__0[TResult](IEnumerable`1 sequence)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.First[TSource](IQueryable`1 source)
at System.Data.Entity.Migrations.History.HistoryRepository.<CreateDiscoveryQueryTrees>d__2a.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at System.Data.Entity.Migrations.Infrastructure.MigratorScriptingDecorator.ScriptUpdate(String sourceMigration, String targetMigration)
at System.Data.Entity.Migrations.Design.ToolingFacade.ScriptUpdateRunner.Run()
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Design.ToolingFacade.ScriptUpdate(String sourceMigration, String targetMigration, Boolean force)
at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Streaming queries are not supported by the configured execution strategy 'SqlAzureExecutionStrategy'. See http://go.microsoft.com/fwlink/?LinkId=309381 for additional information.
```
I am using the latest nightly build from MyGet: EntityFramework.6.0.0-rc1-20801
Comments: Can't this code always default to using the DefaultExcecutionStrategy, regardless of what the app has currently configured? The reality is that you would run this code from VS to generate the script, and not retrying is a fair choice... if I get a transient error in this case (which is very unlikely) then I as a user would be OK with getting and exception, so that I run the command again. I'd generate the script in a dev environment typically (and even most likely a local DB)
I'm trying to run the following command:
Update-Database -SourceMigration 0 -Verbose -Script
If I were to run the same command without the -Script switch, the command works.
Stacktrace below:
```
System.InvalidOperationException: Streaming queries are not supported by the configured execution strategy 'SqlAzureExecutionStrategy'. See http://go.microsoft.com/fwlink/?LinkId=309381 for additional information.
at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__0[TResult](IEnumerable`1 sequence)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.First[TSource](IQueryable`1 source)
at System.Data.Entity.Migrations.History.HistoryRepository.<CreateDiscoveryQueryTrees>d__2a.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at System.Data.Entity.Migrations.Infrastructure.MigratorScriptingDecorator.ScriptUpdate(String sourceMigration, String targetMigration)
at System.Data.Entity.Migrations.Design.ToolingFacade.ScriptUpdateRunner.Run()
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Design.ToolingFacade.ScriptUpdate(String sourceMigration, String targetMigration, Boolean force)
at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Streaming queries are not supported by the configured execution strategy 'SqlAzureExecutionStrategy'. See http://go.microsoft.com/fwlink/?LinkId=309381 for additional information.
```
I am using the latest nightly build from MyGet: EntityFramework.6.0.0-rc1-20801
Comments: Can't this code always default to using the DefaultExcecutionStrategy, regardless of what the app has currently configured? The reality is that you would run this code from VS to generate the script, and not retrying is a fair choice... if I get a transient error in this case (which is very unlikely) then I as a user would be OK with getting and exception, so that I run the command again. I'd generate the script in a dev environment typically (and even most likely a local DB)