Bug: RepoDb.SqlServer v1.1.5 breaks System.Data.SqlClient support
See original GitHub issueBug Description
After updating the RepoDb.SqlServer
package reference from v1.1.4 (which worked fine) to v1.1.5, I get errors about “no database helper mapping found”, as if the bootstrapper has not been run. No code was changed, only the package reference.
Exception Message:
There is no database helper mapping found for
'System.Data.SqlClient.SqlConnection'
. Make sure to install the correct extension library and call the bootstrapper method. You can also visit the library’s installation page (https://repodb.net/tutorial/installation).
Solution
I checked RepoDb.SqlServerBootstrap
at the time of the exception, and IsInitialized
is true
, so this is not a case of the initializer not running. Just in case, I tried, and adding an explicit call to RepoDb.SqlServerBootstrap.Initialize()
, but that did not change anything.
On a hunch, I changed package dependencies from System.Data.SqlClient
to Microsoft.Data.SqlClient
and return a Microsoft.Data.SqlClient.SqlConnection
. With that the errors are gone.
A little digging in the recent changes to RepoDB brings up these:
The issue mentions:
We are afraid that we might affect some of the users if we are to remove this without the proper acceptance from the community.
Suggestion
I don’t mind support for System.Data.SqlClient
being dropped. However it is strange that this is done without a clear mention in the release notes, and without a major version change. That leads me to believe this might be an unintended side-effect.
When this breaking change is on purpose, please bump the major package version, and put a clear message in the the changelog.
Library Version:
Example: RepoDb v1.12.10 and RepoDb.SqlServer v1.1.5
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Just to give you more insights, this has been Tweeted AFAIK and we even placed a special section into our main README page.
FYI: We have updated our installation page as per this request.