Skip to content

OracleDataSource constructors are internal but there are valid cases to use it directly #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marcwittke opened this issue May 5, 2025 · 2 comments

Comments

@marcwittke
Copy link

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
Copy link
Member

alexkeh commented May 5, 2025

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
Copy link
Author

ah nevermind, I found

OracleClientFactory.Instance.CreateDataSource(connectionString);

which was what I was looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants