What is wrong with this code. Why can’t I use SqlConnection?
If you just updated EntityFrameworkCore from version 2.x to 3.x and you’re running into this, change your using statement to Microsoft.Data.SqlClient instead of System.Data.SqlClient. If you’re using EntityFrameworkCore.SqlServer it already has that as a dependency, so you shouldn’t need to install it explicitly. This Microsoft blog explains the change. The Microsoft.Data.SqlClient package, … , will … Read more