apiman-datasource-library 1.3.0

dotnet add package apiman-datasource-library --version 1.3.0
                    
NuGet\Install-Package apiman-datasource-library -Version 1.3.0
                    
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="apiman-datasource-library" Version="1.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="apiman-datasource-library" Version="1.3.0" />
                    
Directory.Packages.props
<PackageReference Include="apiman-datasource-library" />
                    
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 apiman-datasource-library --version 1.3.0
                    
#r "nuget: apiman-datasource-library, 1.3.0"
                    
#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 apiman-datasource-library@1.3.0
                    
#: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=apiman-datasource-library&version=1.3.0
                    
Install as a Cake Addin
#tool nuget:?package=apiman-datasource-library&version=1.3.0
                    
Install as a Cake Tool

APIMan Datasource Library

A .NET library providing interfaces and implementations for connecting to multiple database types. Use it to unify datasource access with connection testing, schema discovery, and query execution across different backends.

Installation

dotnet add package apiman-datasource-library

For GitHub Packages, add the source first:

dotnet nuget add source https://nuget.pkg.github.com/lukoweb/index.json --name github --username YOUR_USERNAME --password YOUR_GITHUB_TOKEN
dotnet add package apiman-datasource-library --source github

Supported Databases

Kind Implementation
PostgreSQL Npgsql
MySQL MySqlConnector
SQL Server Microsoft.Data.SqlClient
MongoDB MongoDB.Driver
HTTP Built-in

Key Interfaces

  • IDataSourceInstance – Initialize connections, test connectivity, get schema, execute queries
  • IDatasource – Datasource metadata (id, name, kind, config, secrets)
  • ISecretProtector – Protect and unprotect sensitive configuration values

Quick Example

// Obtain IDataSourceInstance for your datasource kind (from DI or factory)
IDataSourceInstance instance = GetInstance(DatasourceKind.PostgreSQL);

await instance.Initialize(datasource);
var result = await instance.TestConnection(config, cancellationToken);

if (result.Success)
{
    var schema = await instance.GetSchema(datasource, cancellationToken);
    var executeResult = await instance.ExecuteAsync(request, cancellationToken);
}
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.0 155 2/26/2026
1.2.0 128 2/24/2026
1.1.0 138 2/19/2026
1.0.0 129 2/26/2026