EntityFramework.Docs icon indicating copy to clipboard operation
EntityFramework.Docs copied to clipboard

An example how to use

Open michael-freidgeim-webjet opened this issue 1 year ago • 5 comments

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.

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

ajcvickers avatar Sep 07 '23 14:09 ajcvickers

@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 avatar Sep 07 '23 21:09 MNF

@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 avatar Sep 07 '23 22:09 MNF

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

ajcvickers avatar Sep 08 '23 11:09 ajcvickers

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

MNF avatar Sep 08 '23 12:09 MNF