Upgrading to V5 - schotime/NPoco GitHub Wiki
Sql Server
We have made the decision to switch to Microsoft.Data.SqlClient as this is a direct replacement for System.Data.SqlClient
Brand new project
- Add
<PackageReference Include="NPoco.SqlServer" Version="5.0.0" />to your project - Create your own
MyDatabaseinheritingSqlServerDatabase - Instantiate
MyDatabasewherever needed
Existing project*
- Replace your
NPocoreference withNPoco.SqlServer - Remove references to
System.Data.SqlClientif you manually have them. - Add
SqlClientFactory.Instanceas the 3rd parameter
* if you have already created your own MyDatabase inherit it from SqlServerDatabase instead of Database