This article is contributed. See the original author and article here.

Microsoft.Data.SqlClient 3.0 Preview 2 has been released. This release contains improvements and updates to the Microsoft.Data.SqlClient data provider for SQL Server.


Our plan is to provide GA releases twice a year with two preview releases in between. This cadence should provide time for feedback and allow us to deliver features and fixes in a timely manner. This second 3.0 preview includes many fixes and changes over the previous 3.0 Preview 1 release.


 


Please note the first item in the list of breaking changes from previous releases. If you use Azure Managed Identity authentication with a user-assigned identity, you will need to update your connection information.


 


Breaking Changes over preview release 3.0.0-preview1


 



  • For User-Assigned, Azure Managed Identity (MSI) authentication, the `User Id` connection property now requires `Client Id` instead of `Object Id` [read more about the new Azure.Identity library dependency]

  • `SqlDataReader` now returns a `DBNull` value instead of an empty `byte[]`. Legacy behavior can be enabled by setting `AppContext` switch **Switch.Microsoft.Data.SqlClient.LegacyRowVersionNullBehavior** [read more about this change]


Preview 2 also includes many bug fixes and performance improvements. For the full list of changes in Microsoft.Data.SqlClient 3.0 Preview 2, please see the Release Notes.


 


If you missed our 3.0 Preview 1 announcement, the most notable new feature in 3.0 is Configurable Retry Logic.


 


Configurable retry logic is available when you’ve enabled an app context switch. Configurable retry logic builds significantly more transient error handling functionality into SqlClient than existed previously. It will allow you to retry connection and command executions based on configurable settings. Since it is even configurable outside of your code, it can help make existing applications more resilient to transient errors that you might encounter in real-world use.
For a detailed look into this feature, check out the blog post Introducing Configurable Retry Logic in Microsoft.Data.SqlClient v3.0.0-Preview1.


 


To try out the new package, add a NuGet reference to Microsoft.Data.SqlClient in your application and pick the 3.0 preview 2 version.


 


We appreciate the time and effort you spend checking out our previews. It makes the final product that much better. If you encounter any issues or have any feedback, head over to the SqlClient GitHub repository and submit an issue.


 


David Engel

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.