DatabaseErrorPageExtensions Class¶
Microsoft.AspNetCore.Builder.IApplicationBuilder extension methods for the Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.
- Namespace
Microsoft.AspNetCore.Builder- Assemblies
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
Syntax¶
public class DatabaseErrorPageExtensions
-
class
Microsoft.AspNetCore.Builder.DatabaseErrorPageExtensions
Methods¶
-
UseDatabaseErrorPage(Microsoft.AspNetCore.Builder.IApplicationBuilder)¶ Captures synchronous and asynchronous database related exceptions from the pipeline that may be resolved using Entity Framework migrations. When these exceptions occur an HTML response with details of possible actions to resolve the issue is generated.
Arguments: app (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The Microsoft.AspNetCore.Builder.IApplicationBuilderto register the middleware with.Return type: Microsoft.AspNetCore.Builder.IApplicationBuilder Returns: The same Microsoft.AspNetCore.Builder.IApplicationBuilderinstance so that multiple calls can be chained.public static IApplicationBuilder UseDatabaseErrorPage(this IApplicationBuilder app)
-
UseDatabaseErrorPage(Microsoft.AspNetCore.Builder.IApplicationBuilder, Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions) Captures synchronous and asynchronous database related exceptions from the pipeline that may be resolved using Entity Framework migrations. When these exceptions occur an HTML response with details of possible actions to resolve the issue is generated.
Arguments: - app (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The
Microsoft.AspNetCore.Builder.IApplicationBuilderto register the middleware with. - options (Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions) – A
Microsoft.AspNetCore.Builder.DatabaseErrorPageOptionsthat specifies options for the middleware.
Return type: Returns: The same
Microsoft.AspNetCore.Builder.IApplicationBuilderinstance so that multiple calls can be chained.public static IApplicationBuilder UseDatabaseErrorPage(this IApplicationBuilder app, DatabaseErrorPageOptions options)
- app (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The
-