-
Notifications
You must be signed in to change notification settings - Fork 305
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
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