dotnet / EntityFramework.Docs

Documentation for Entity Framework Core and Entity Framework 6
https://docs.microsoft.com/ef/
Creative Commons Attribution 4.0 International
1.64k stars 1.96k forks source link

An example how to use #4479

Open michael-freidgeim-webjet opened 1 year ago

michael-freidgeim-webjet commented 1 year ago

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.

ajcvickers commented 1 year ago

See https://learn.microsoft.com/en-us/ef/core/logging-events-diagnostics/

MNF commented 1 year ago

@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.

MNF commented 1 year ago

@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

ajcvickers commented 1 year ago

@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.

MNF commented 1 year ago

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