Skip to content
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

Merged SqlClientFactory between .NET Core and Framework #2369

Merged
merged 4 commits into from
May 14, 2024

Conversation

edwardneal
Copy link
Contributor

@edwardneal edwardneal commented Feb 25, 2024

Contributes to #1261. Also relates to #17 (specifically the last comment about SqlDataSourceEnumerator) and #2346.

This merges SqlClientFactory between .NET Core and Framework. In the process, it also implements CreateDataSourceEnumerator in .NET, linking it to the newly-added SqlDataSourceEnumerator class.

In .NET Framework, SqlClientFactory also provides CreatePermission and implements the IServiceProvider interface. I've left the latter in place to avoid a breaking change, although IServiceProvider is only used to access SqlProviderServices (which is not part of the project.)

In the process, this implements CreateDataSourceEnumerator in .NET, linking it to the newly-added SqlDataSourceEnumerator class. In .NET Framework, it also needs to implement CreatePermission and the IServiceProvider interface.
Widened test coverage (slightly) to encompass the new CreateDataSourceEnumerator functionality. Changed FactoryMethodTest to account for the fact that this returns a singleton.
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 94.73684% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 72.69%. Comparing base (4c0f013) to head (70c437d).

❗ Current head 70c437d differs from pull request most recent head 2a0bca3. Consider uploading reports for the commit 2a0bca3 to get more accurate results

Files Patch % Lines
...t/src/Microsoft/Data/SqlClient/SqlClientFactory.cs 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2369      +/-   ##
==========================================
- Coverage   72.75%   72.69%   -0.06%     
==========================================
  Files         313      311       -2     
  Lines       61718    61709       -9     
==========================================
- Hits        44901    44862      -39     
- Misses      16817    16847      +30     
Flag Coverage Δ
addons 92.88% <ø> (ø)
netcore 77.00% <100.00%> (-0.09%) ⬇️
netfx 70.42% <93.75%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@David-Engel David-Engel merged commit 5cb73fd into dotnet:main May 14, 2024
148 checks passed
@edwardneal edwardneal deleted the issue-1261-merge-sqlclientfactory branch May 14, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Enhancement New feature request ➕ Code Health Changes related to source code improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants