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.IApplicationBuilder to register the middleware with.
Return type:Microsoft.AspNetCore.Builder.IApplicationBuilder
Returns:The same Microsoft.AspNetCore.Builder.IApplicationBuilder instance 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:
Return type:

Microsoft.AspNetCore.Builder.IApplicationBuilder

Returns:

The same Microsoft.AspNetCore.Builder.IApplicationBuilder instance so that multiple calls can be chained.

public static IApplicationBuilder UseDatabaseErrorPage(this IApplicationBuilder app, DatabaseErrorPageOptions options)