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