Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
DatabaseDeveloperPageExceptionFilterServiceExtensions.AddDatabaseDeveloperPageExceptionFilter Method
Definition
- Namespace:
- Microsoft.Extensions.DependencyInjection
- Assembly:
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.dll
- Package:
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v10.0.0
- Package:
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v5.0.9
- Package:
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v6.0.6
- Package:
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v7.0.5
- Package:
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v8.0.19
- Package:
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore v9.0.8
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
Was this page helpful?
