Repository: dotnet/efcore

Issue:
EF Core Migration Bundles: no way to passthrough custom args to generated efbundle
I use IDesignTimeDbContextFactory and custom args in CreateDbContext(string[] args)

Then it is possible to apply update like so
`dotnet ef database update -- --environment TEST

It is expected to do the same with bundles 
` .\efbundle.exe -- --environment TEST




Hints:
Note for triage: repros for me.

```
PS C:\local\code\AllTogetherNow\SixOh> dotnet ef database update -- --environment TEST
Build started...
Build succeeded.
--environment
TEST
Applying migration '20211217110035_One'.
Done.
PS C:\local\code\AllTogetherNow\SixOh> dotnet ef migrations bundle
Build started...
Build succeeded.
Building bundle...
Done. Migrations Bundle: C:\local\code\AllTogetherNow\SixOh\efbundle.exe
PS C:\local\code\AllTogetherNow\SixOh> .\efbundle.exe -- --environment TEST           
Specify --help for a list of available options and commands.
Unrecognized option '--'
PS C:\local\code\AllTogetherNow\SixOh> .\efbundle.exe --environment TEST   
Specify --help for a list of available options and commands.
Unrecognized option '--environment'
PS C:\local\code\AllTogetherNow\SixOh>
```

/cc @bricelam 
Doh, looks like I forgot to set `AllowArgumentSeparator` to true in [MigrationsBundle.Configure](https://github.com/dotnet/efcore/blob/b39ca7f24c96df9aec977a29f35b1c0c70b54f5f/src/EFCore.Design/Migrations/Design/MigrationsBundle.cs#L65).

Patch:
diff --git a/src/EFCore.Design/Migrations/Design/MigrationsBundle.cs b/src/EFCore.Design/Migrations/Design/MigrationsBundle.cs
index 4a2b63721b5..814ea482535 100644
--- a/src/EFCore.Design/Migrations/Design/MigrationsBundle.cs
+++ b/src/EFCore.Design/Migrations/Design/MigrationsBundle.cs
@@ -40,11 +40,8 @@ public static int Execute(string? context, Assembly assembly, Assembly startupAs
             _assembly = assembly;
             _startupAssembly = startupAssembly;
 
-            var app = new CommandLineApplication
-            {
-                Name = "bundle",
-                HandleResponseFiles = true
-            };
+            var app = new CommandLineApplication { Name = "efbundle" };
+
             Configure(app);
 
             try
@@ -73,6 +70,7 @@ public static int Execute(string? context, Assembly assembly, Assembly startupAs
         internal static void Configure(CommandLineApplication app)
         {
             app.FullName = DesignStrings.BundleFullName;
+            app.AllowArgumentSeparator = true;
 
             _migration = app.Argument("<MIGRATION>", DesignStrings.MigrationDescription);
             _connection = app.Option("--connection <CONNECTION>", DesignStrings.ConnectionDescription);
@@ -83,6 +81,8 @@ internal static void Configure(CommandLineApplication app)
             var noColor = app.Option("--no-color", DesignStrings.NoColorDescription);
             var prefixOutput = app.Option("--prefix-output", DesignStrings.PrefixDescription);
 
+            app.HandleResponseFiles = true;
+
             app.OnExecute(
                 args =>
                     {


Test patch:
diff --git a/test/EFCore.Design.Tests/Migrations/Design/MigrationsBundleTest.cs b/test/EFCore.Design.Tests/Migrations/Design/MigrationsBundleTest.cs
index cf4a7e5fa74..ade059f6ef5 100644
--- a/test/EFCore.Design.Tests/Migrations/Design/MigrationsBundleTest.cs
+++ b/test/EFCore.Design.Tests/Migrations/Design/MigrationsBundleTest.cs
@@ -44,9 +44,27 @@ public void Long_names_are_unique()
             }
         }
 
+        [Fact]
+        public void HandleResponseFiles_is_true()
+        {
+            var app = new CommandLineApplication { Name = "efbundle" };
+            MigrationsBundle.Configure(app);
+
+            Assert.True(app.HandleResponseFiles);
+        }
+
+        [Fact]
+        public void AllowArgumentSeparator_is_true()
+        {
+            var app = new CommandLineApplication { Name = "efbundle" };
+            MigrationsBundle.Configure(app);
+
+            Assert.True(app.AllowArgumentSeparator);
+        }
+
         private static IEnumerable<CommandLineApplication> GetCommands()
         {
-            var app = new CommandLineApplication { Name = "bundle" };
+            var app = new CommandLineApplication { Name = "efbundle" };
 
             MigrationsBundle.Configure(app);