-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Use service to create connections #774
Comments
We should introduce a service for this, so that we aren't creating connections explicitly. |
I'd be very interested in this feature, as I have an ADO.NET provider implementation that supports standard T-SQL. Currently, I have to create a whole EF provider for this, where as if I could get EF to just use the correct Could you make it:
|
Can you make it so I am still able to plugin in my "non well known" ado.net provider - i.e so that any "well known" provider invariant names isn't the exclusive list that EF will work with.. :) |
@dazinator In the "Core" version of ADO.NET (i.e. System.Data.Common and System.Data.SqlClient packages) there is still the concept of provider factories but not the concept of a provider factory registry in configuration, so we cannot depend on that. We could build a service within EF to resolve invariant names to provider factories so that you can register your replacement, but at that point I don't know if we really need the indirection, e.g. there could be a more direct way to tell the EF provider for SQL Server to use a different provider factory. BTW, we haven't prioritized this for RTM because we are focusing on just getting things working with SQL Server, but this is an important part of our design that we definitively plan to focus on getting right later. |
@divega ahh ok I understand. Sounds like it's all in hand, I'll look forward to taking advantage of that capability once it's added! Cheers. |
@divega Is there any progress to implementing a service to register a different factory? We need a way to do this in order to add support for profiling Entity Framework Core using Entity Framework Profiler. |
I was investigating making a Is this planned? Or am I missing an obvious hook here for profiling? |
Should be possible to do this with an |
Related: #28266 |
Any remaining work covered by issues referenced above. |
Rather than calling, for example, new SqlConnection() directly. Using the provider factory makes us compatible with wrapping ADO.NET providers. However, we will need to be able to obtain the provider factory in some way. Since this code is already provider-specific we could assume knowledge of well-known provider invariant names. We could also punt on this and tell people to always use explicitly created connections if they need wrapping ADO.NET providers.
The text was updated successfully, but these errors were encountered: