OracleDataSource constructors are internal but there are valid cases to use it directly
Closed this issue · 2 comments
marcwittke commented
Therefore, the only way to use the OracleDataSource is through microsoft's dependency injection abstractions.
var services = new ServiceCollection();
services.AddOracleDataSource("MyDb", "User Id=...;Password=...;Data Source=...");I want to be able to create the OracleDataSource in scenarios without such injection container
- using another container, like SimpleInjector
- using Poor Man's DI in test environments
alexkeh commented
Has this feature been proposed to MS? If so, are they planning to add it?
Ideally, Oracle would like to follow what will become the ADO.NET standard so that other frameworks can easily use the feature without having to implement a one-off just for us.
marcwittke commented
ah nevermind, I found
OracleClientFactory.Instance.CreateDataSource(connectionString);
which was what I was looking for.