CargoWiseReplicationAPIInterface.Database 1.1.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package CargoWiseReplicationAPIInterface.Database --version 1.1.8
                    
NuGet\Install-Package CargoWiseReplicationAPIInterface.Database -Version 1.1.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CargoWiseReplicationAPIInterface.Database" Version="1.1.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CargoWiseReplicationAPIInterface.Database" Version="1.1.8" />
                    
Directory.Packages.props
<PackageReference Include="CargoWiseReplicationAPIInterface.Database" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CargoWiseReplicationAPIInterface.Database --version 1.1.8
                    
#r "nuget: CargoWiseReplicationAPIInterface.Database, 1.1.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CargoWiseReplicationAPIInterface.Database@1.1.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CargoWiseReplicationAPIInterface.Database&version=1.1.8
                    
Install as a Cake Addin
#tool nuget:?package=CargoWiseReplicationAPIInterface.Database&version=1.1.8
                    
Install as a Cake Tool

<p align="center"> <img src="https://github.com/user-attachments/assets/7d62b044-b71d-4434-9721-3e5bd919301f" width="200" height="200" /> </p>

Build and Publish GitHub last commit (branch) GitHub commit activity (branch) Static Badge Static Badge Static Badge

Static Badge Nuget Nuget

Static Badge Nuget Nuget

Static Badge Nuget Nuget

CargoWise Replication API Interface

You can find the package on the NuGet Package Manager.

This is a small project to make a nice interface to work with CargoWise's Replication API. Instead of you having to manually do checks and calls to the API for changes, this project makes it a lot easier. As an example, say you wanted all changes that have occured since the LSN marker 0x00027FF400006C70014C on the database table dbo.GlbStaff:

class GlbStaff : BaseReturnData {
	public Guid? GS_PK { get; set; }
	public string? GS_LoginName { get; set; }
	public string? GS_EmploymentBasis { get; set; }
	...
}

var api = new ReplicationAPI("url", "username", "password");
var changes = await api.GetDetails<GlbStaff>("0x00027FF400006C70014C", "0x0003245300048BB70003", "dbo", "GlbStaff");

// OpCodes define what operation it is.
//   1       = delete
//   2       = insert
//   3 and 4 = update
var added = changes.Where(x => x.OpCode == 2);

The version number of this package correspond to the replication API version the replication API returns!

CargoWiseReplicationAPIInterface.Database

You can find the package on the NuGet Package Manager.

This is a extension of the base API project, that makes it easier to make a MSSQL database to replicate data directly into. You can use it to automatically build a replication database, all the STPs needed for insert/update/delete and SLN saving. Its primary use is to give a simple class (DatabaseReplicator) where you give some setup parameters and from there on you can simply just use it to replicate into a database:

var dbReplicator = new DatabaseReplicator(
	new DBClient("connection-string"),
	"CWR", // Or some other schema
	1000, // how many items to send to the database at a time
	new List<Type>(){ typeof(GlbStaff) },
	"replication-url",
	"replication-user",
	"replication-password"
);

await dbReplicator.Replicate();

This will automatically get all changes since last time you called the method, insert them into your replication database and finally update the current LSN value the system is at.

You can also use this project to build the replication database dynamically, instead of making the tables and STPs yourself:

var builder = new DatabaseQueryBuilder("CWR");
var query = builder.Build("YourNamespace.Tables");
query += builder.BuildLSNSystem();

This will create a SQL query that will build the entire database for you automatically. If you make any changes to the table models, it will also update them (except if there are data in tables, you will have to update them manually)

CargoWiseReplicationAPIInterface.Serialization

You can find the package on the NuGet Package Manager.

This is a helper project that can be used for some manual inserting and serialization.

The biggest thing in this is the CWExcelImporter, which is a class that can be used to import direct reports (in excel format) from CW into a replication database. (useful when you need to insert backlog data)

An example of how to use it can be seen here:

var merger = new DatabaseMergerService(
	new DBClient("connection-string"),
	100000,
	"CWR"
);
var importer = new CWExcelImporter(merger, null, "YourNamespace.Tables");

// assuming you have read a Excel file in as a stream 'str':
await importer.ImportExcel(str, false);

This will automatically parse the format of CW's reports, match them with the correct table, and insert the data. By default, it will only do INSERT statements, not UPDATE. If you set the forceupdate to true, then all the data will be treated as UPDATE statements.

You can use another tool of mine to make the reports you need for exporting CargoWise data in the correct format.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CargoWiseReplicationAPIInterface.Database:

Package Downloads
CargoWiseReplicationAPIInterface.Serialization

An interface to work with CargoWises new Replication API

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.10 109 8/25/2026
1.1.9 104 8/25/2026
1.1.8 139 7/31/2026
1.1.7 120 7/27/2026
1.1.6 115 7/9/2026
1.1.5 110 7/9/2026
1.1.4 112 7/9/2026
1.1.3 117 7/8/2026
1.1.2 118 7/8/2026
1.1.1 176 6/18/2026
1.1.0 125 6/8/2026
1.0.9 126 6/1/2026
1.0.8 130 5/29/2026
1.0.7 132 5/27/2026
1.0.6 115 5/27/2026
1.0.5 125 5/27/2026
1.0.4 434 3/17/2026
1.0.3 178 3/9/2026
1.0.2 112 3/9/2026
1.0.1 121 3/9/2026
Loading failed