EntityFramework.Docs
EntityFramework.Docs copied to clipboard
An example how to use
Please add an example(or link to example) how to use [Enter feedback here]
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 083351e7-ab0f-298f-877a-cfb4001c12f3
- Version Independent ID: 3fa0955d-9a50-1aa4-4478-ae6a588bb8a8
- Content: DbContextOptionsBuilder.EnableDetailedErrors(Boolean) Method (Microsoft.EntityFrameworkCore)
- Content Source: dotnet/xml/Microsoft.EntityFrameworkCore/DbContextOptionsBuilder.xml
- Product: ef-core-api
- GitHub Login: @dotnet-bot
- Microsoft Alias: avickers
See https://learn.microsoft.com/en-us/ef/core/logging-events-diagnostics/
@ajcvickers , sorry, but the link doesn’t show EnableDetailedErrors at all.
Also, one of my colleagues asked, will enabling the detailed errors include in the exception the content of the request. As I understand, not, but it will be useful to explicitly explain it.
@ajcvickers , did you mean https://learn.microsoft.com/en-us/ef/core/dbcontext-configuration/#other-dbcontext-configuration ? Please add it to the page and mention differences with EnableSensitiveDataLogging
@MNF I gave you the overview link to the logging docs since you didn't mention what kind of logging you are using. There is an example for simple logging and an example for Microsoft.Extensions.Logging.
Thanks, it will be good to add both links to the DbContextOptionsBuilder.EnableDetailedErrors(Boolean) Method (Microsoft.EntityFrameworkCore) page. Btw, I came to the method from https://stackoverflow.com/questions/55883704/entity-framework-core-sqlnullvalueexception-data-is-null-how-to-troubleshoo/55889874#55889874