Skip to content

Commit 36a2dfd

Browse files
Provide Microsoft.AspNetCore.Diagnostics.EntityFramework package README (#57540)
1 parent c9dee16 commit 36a2dfd

File tree

1 file changed

+42
-0
lines changed
  • src/Middleware/Diagnostics.EntityFrameworkCore/src

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## About
2+
3+
`Microsoft.AspNetCore.Diagnostics.EntityFramework` provides an ASP.NET Core middleware for EF Core error pages, allowing detection and diagnosis of errors with EF Core migrations.
4+
5+
## Key Features
6+
7+
* Captures and displays detailed error information from Entity Framework Core database operations
8+
* Helps developers diagnose and troubleshoot database-related issues in ASP.NET Core applications
9+
10+
## How to Use
11+
12+
To use `Microsoft.AspNetCore.Diagnostics.EntityFramework`, follow these steps:
13+
14+
### Installation
15+
16+
```shell
17+
dotnet add package Microsoft.AspNetCore.Diagnostics.EntityFramework
18+
```
19+
20+
### Configuration
21+
22+
To use the middleware, add it to the ASP.NET Core pipeline defined in your app's `Program.cs`:
23+
24+
```csharp
25+
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
26+
27+
var app = builder.build();
28+
29+
if (app.Environment.IsDevelopment())
30+
{
31+
app.UseDeveloperExceptionPage();
32+
app.UseMigrationsEndPoint();
33+
}
34+
```
35+
36+
## Additional Documentation
37+
38+
For more information on using Entity Framework Core in ASP.NET Core applications, refer to the [official documentation](https://learn.microsoft.com/aspnet/core/data/ef-rp/intro).
39+
40+
## Feedback & Contributing
41+
42+
`Microsoft.AspNetCore.Diagnostics.EntityFramework` is released as open-source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/aspnetcore).

0 commit comments

Comments
 (0)