DatabaseDeveloperPageExceptionFilterServiceExtensions.AddDatabaseDeveloperPageExceptionFilter Method

Definition

In combination with UseDeveloperExceptionPage, this captures database-related exceptions that can be resolved by using Entity Framework migrations. When these exceptions occur, an HTML response with details about possible actions to resolve the issue is generated.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDatabaseDeveloperPageExceptionFilter (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddDatabaseDeveloperPageExceptionFilter : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddDatabaseDeveloperPageExceptionFilter (services As IServiceCollection) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection for adding services.

Returns

Remarks

This should only be enabled in the Development environment.

Applies to