Open ajcvickers opened 5 years ago
As a first step into the EF Core source, I'm trying to think about a way to solve this issue. So far, I thought about adding a DbContextOptionsBuilder.SetDatabaseAccessTimeout method, which would set a CoreOptionsExtension value. Could this be a good start to handle this issue ?
@sputier That sounds reasonable, you can also open a WIP/draft PR if you aren't sure about what needs to be done next. Don't forget to add tests for different providers.
The idea here is to have a core-level API to set a "database access timeout". Every provider would then use the value set to configure appropriate timeouts in the lower-level APIs that the provider uses. For example, a relational provider would use this to set both command and connection timeouts.
Any call to a more provider-specific API would override anything set here.
This has two advantages: