The Entity Framework 3.0 Preview connects to Cosmos DB using the Direct connection mode and this is non configurable by the consumer of the API. While I understand that this is the recommended connection mode to Cosmos DB moving forward, we're using Istio as a service mesh and we allow connections outside the Kubernetes cluster on a whitelist basis. Because Istio doesn't allow to specify port ranges, this would force us to write a list of all the ports in the 10,000-20,000 to allow the API to connect to the database.
While this is not a bug, it would be nice if in the future the client was allowed to alter the default connection mode to Cosmos DB.
EF Core version: 3.0.0-preview7.19362.6
Database Provider: Microsoft.EntityFrameworkCore.Cosmos
Operating system: Windows 10
IDE: Visual Studio 2019 16.1.6
I've encountered the same problem as well. Having Gateway mode as an configurable option would really help.
Thanks
Anything I can do to help this along? I've been looking at the EF Core source code and could work on putting together a PR to expose this setting as a context option.
@AndriySvyryd Thoughts on this?
I don't see any issues with adding an option for this in the same way as Region.
I started having a look at this: https://github.com/chiasottis/EntityFrameworkCore/tree/ConnectionModeAsOption