From 3c6b227e63bed4ee9d5f6510c5d86fb0eb6dd023 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Mon, 13 Dec 2021 13:57:51 -1000 Subject: [PATCH] Update ProgramSeed.cs (#24294) --- .../sample/RazorPagesMovie60/ProgramSeed.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/aspnetcore/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie60/ProgramSeed.cs b/aspnetcore/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie60/ProgramSeed.cs index 93aaf60326..9a1bc9868b 100644 --- a/aspnetcore/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie60/ProgramSeed.cs +++ b/aspnetcore/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie60/ProgramSeed.cs @@ -21,11 +21,7 @@ using (var scope = app.Services.CreateScope()) SeedData.Initialize(services); } -if (app.Environment.IsDevelopment()) -{ - app.UseDeveloperExceptionPage(); -} -else +if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error"); app.UseHsts(); @@ -85,4 +81,4 @@ app.MapRazorPages(); app.Run(); #endregion -#endif \ No newline at end of file +#endif