As of .NET 8.0, System.Data.SqlClient is obsolete. Instead, use Microsoft.Data.SqlClient.
https://techcommunity.microsoft.com/blog/sqlserver/announcement-system-data-sqlclient-package-is-now-deprecated/4227205