瀏覽代碼

Add MigrationsEndPoint when DatabaseDeveloperPageExceptionFilter is used (#25554)

John Luo 5 年之前
父節點
當前提交
c902645115
共有 18 個文件被更改,包括 35 次插入0 次删除
  1. 1 0
      src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Startup.cs
  2. 1 0
      src/Identity/samples/IdentitySample.DefaultUI/Startup.cs
  3. 1 0
      src/Identity/samples/IdentitySample.Mvc/Startup.cs
  4. 1 0
      src/Identity/testassets/Identity.DefaultUI.WebSite/NoIdentityStartup.cs
  5. 1 0
      src/Identity/testassets/Identity.DefaultUI.WebSite/StartupBase.cs
  6. 1 0
      src/Identity/testassets/Identity.DefaultUI.WebSite/StartupWithoutEndpointRouting.cs
  7. 2 0
      src/MusicStore/samples/MusicStore/ForTesting/Mocks/StartupOpenIdConnectTesting.cs
  8. 2 0
      src/MusicStore/samples/MusicStore/ForTesting/Mocks/StartupSocialTesting.cs
  9. 2 0
      src/MusicStore/samples/MusicStore/Startup.cs
  10. 2 0
      src/MusicStore/samples/MusicStore/StartupNtlmAuthentication.cs
  11. 2 0
      src/MusicStore/samples/MusicStore/StartupOpenIdConnect.cs
  12. 3 0
      src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Startup.cs
  13. 3 0
      src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Startup.cs
  14. 3 0
      src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs
  15. 3 0
      src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs
  16. 3 0
      src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Startup.cs
  17. 3 0
      src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Startup.cs
  18. 1 0
      src/Security/samples/Identity.ExternalClaims/Startup.cs

+ 1 - 0
src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Startup.cs

@@ -50,6 +50,7 @@ namespace ApiAuthSample
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+                app.UseMigrationsEndPoint();
             }
             else
             {

+ 1 - 0
src/Identity/samples/IdentitySample.DefaultUI/Startup.cs

@@ -60,6 +60,7 @@ namespace IdentitySample.DefaultUI
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+                app.UseMigrationsEndPoint();
             }
             else
             {

+ 1 - 0
src/Identity/samples/IdentitySample.Mvc/Startup.cs

@@ -63,6 +63,7 @@ namespace IdentitySample
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+                app.UseMigrationsEndPoint();
             }
             else
             {

+ 1 - 0
src/Identity/testassets/Identity.DefaultUI.WebSite/NoIdentityStartup.cs

@@ -49,6 +49,7 @@ namespace Identity.DefaultUI.WebSite
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+                app.UseMigrationsEndPoint();
             }
             else
             {

+ 1 - 0
src/Identity/testassets/Identity.DefaultUI.WebSite/StartupBase.cs

@@ -65,6 +65,7 @@ namespace Identity.DefaultUI.WebSite
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+                app.UseMigrationsEndPoint();
             }
             else
             {

+ 1 - 0
src/Identity/testassets/Identity.DefaultUI.WebSite/StartupWithoutEndpointRouting.cs

@@ -34,6 +34,7 @@ namespace Identity.DefaultUI.WebSite
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+                app.UseMigrationsEndPoint();
             }
             else
             {

+ 2 - 0
src/MusicStore/samples/MusicStore/ForTesting/Mocks/StartupOpenIdConnectTesting.cs

@@ -125,6 +125,8 @@ namespace MusicStore
             // During development use the ErrorPage middleware to display error information in the browser
             app.UseDeveloperExceptionPage();
 
+            app.UseMigrationsEndPoint();
+
             // Configure Session.
             app.UseSession();
 

+ 2 - 0
src/MusicStore/samples/MusicStore/ForTesting/Mocks/StartupSocialTesting.cs

@@ -161,6 +161,8 @@ namespace MusicStore
             // Note: Not recommended for production.
             app.UseDeveloperExceptionPage();
 
+            app.UseMigrationsEndPoint();
+
             // Configure Session.
             app.UseSession();
 

+ 2 - 0
src/MusicStore/samples/MusicStore/Startup.cs

@@ -134,6 +134,8 @@ namespace MusicStore
             // During development use the ErrorPage middleware to display error information in the browser
             app.UseDeveloperExceptionPage();
 
+            app.UseMigrationsEndPoint();
+
             Configure(app);
         }
 

+ 2 - 0
src/MusicStore/samples/MusicStore/StartupNtlmAuthentication.cs

@@ -117,6 +117,8 @@ namespace MusicStore
             // Note: Not recommended for production.
             app.UseDeveloperExceptionPage();
 
+            app.UseMigrationsEndPoint();
+
             app.Use((context, next) =>
             {
                 context.Response.Headers["Arch"] = RuntimeInformation.ProcessArchitecture.ToString();

+ 2 - 0
src/MusicStore/samples/MusicStore/StartupOpenIdConnect.cs

@@ -124,6 +124,8 @@ namespace MusicStore
             // During development use the ErrorPage middleware to display error information in the browser
             app.UseDeveloperExceptionPage();
 
+            app.UseMigrationsEndPoint();
+
             // Configure Session.
             app.UseSession();
 

+ 3 - 0
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Startup.cs

@@ -136,6 +136,9 @@ namespace BlazorServerWeb_CSharp
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+#if (IndividualLocalAuth)
+                app.UseMigrationsEndPoint();
+#endif
             }
             else
             {

+ 3 - 0
src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Startup.cs

@@ -99,6 +99,9 @@ namespace ComponentsWebAssembly_CSharp.Server
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+#if (IndividualLocalAuth)
+                app.UseMigrationsEndPoint();
+#endif
                 app.UseWebAssemblyDebugging();
             }
             else

+ 3 - 0
src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs

@@ -119,6 +119,9 @@ namespace Company.WebApplication1
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+#if (IndividualLocalAuth)
+                app.UseMigrationsEndPoint();
+#endif
             }
             else
             {

+ 3 - 0
src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs

@@ -120,6 +120,9 @@ namespace Company.WebApplication1
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+#if (IndividualLocalAuth)
+                app.UseMigrationsEndPoint();
+#endif
             }
             else
             {

+ 3 - 0
src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Startup.cs

@@ -72,6 +72,9 @@ namespace Company.WebApplication1
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+#if (IndividualLocalAuth)
+                app.UseMigrationsEndPoint();
+#endif
             }
             else
             {

+ 3 - 0
src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Startup.cs

@@ -74,6 +74,9 @@ namespace Company.WebApplication1
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+#if (IndividualLocalAuth)
+                app.UseMigrationsEndPoint();
+#endif
             }
             else
             {

+ 1 - 0
src/Security/samples/Identity.ExternalClaims/Startup.cs

@@ -74,6 +74,7 @@ namespace Identity.ExternalClaims
             if (env.IsDevelopment())
             {
                 app.UseDeveloperExceptionPage();
+                app.UseMigrationsEndPoint();
             }
             else
             {