-
Notifications
You must be signed in to change notification settings - Fork 302
Upgrading to V5
Adam Schroder edited this page Nov 13, 2020
·
2 revisions
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
MyDatabase
inheritingSqlServerDatabase
- Instantiate
MyDatabase
wherever needed
Existing project*
- Replace your
NPoco
reference withNPoco.SqlServer
- Remove references to
System.Data.SqlClient
if you manually have them. - Add
SqlClientFactory.Instance
as the 3rd parameter
* if you have already created your own MyDatabase
inherit it from SqlServerDatabase
instead of Database