Stellar.DAL 1.1.5

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

Stellar Data Access Layer

The evolution of Randy Burden's Sequelocity.NET.

Beyond keeping up with .NET and system libraries' upgrades and splitting code into multiple files, this DAL attempts to (1) include Snowflake and (2) enhance auto-mapping.

The Database Client

The generic DatabaseClient<T> where T : DbConnection takes in a connection string and exposes the APIs for almost every database interaction, yet it does not build a connection string or read it from configuration files or the options pattern app settings. A valid key-value pair string usually works:

[Fact] 
public void ConnectsToLocalDb() 
{ 
    var connectionString = @"Data Source=(LocalDb)\MSSQLLocalDB;Integrated Security=True;Initial Catalog=master";

    var cmd = new DatabaseClient<SqlConnection>(connectionString) 
        .GetCommand() 
        .SetCommandText("SELECT 1;"); 

    Assert.Equal(1, cmd.ExecuteScalar()); 
}

The Azure Database Client

The specialized AzureDatabaseClient derives from the generic database client solely to wrap the token callback and caching logic.

User managed identity authentication flow

The default authentication takes in the client ID of a user managed identity, e.g:

    private readonly string connectionString =
        "Server=tcp:<server_name>.database.windows.net;" +
        "Database=AdventureWorks;" +
        "User Id=<MANAGED_IDENTITY_CLIENT_ID>;" +
        "Encrypt=True;";

Store credentials in system environment variables or vaults.

App registration authetication flow

App registrations are Microsoft Entra ID principals. You'll need a few extra steps on your machine and on the database itself.

For starter, you'll need AZURE_* IDs from your Azure tenant:

image

You must also register the identity on the database itself and give it the right authorization:

-- create a database from an identity that exists in the directory
CREATE USER [your_app_name] FROM EXTERNAL PROVIDER;

-- add to roles as needed
ALTER ROLE <db_datareader> ADD MEMBER <your_app_name>;
ALTER ROLE <db_datawriter> ADD MEMBER <your_app_name>;

-- grant permissions as needed
GRANT VIEW DEFINITION [ON <object>] TO <your_app_name>;

This and the underlying authentication flow removes sensitive information from connection strings:

var connectionString = "Server=<server_name>.database.windows.net,1433;Initial Catalog=<database_name>;Connect Timeout=30"

Azure Remote Tests

The remote database fixture tests are tied to a specific Azure subscription and Azure SQL Server, and therefore will fail from your box. Besides installing the latest Az.Accounts PowerShell module, issuing an az login and selecting the right subscription, currently a subscription admin or owner has to add a firewall rule, so again, remote tests will fail.

Remote tests are also known to time out initially for serverless databases. Consider increasing the timeout in the connection string or the API calls and rerunning them if/when timeout exceptions are thrown.

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.1.5 119 2/11/2026
1.1.4 119 10/17/2025
1.0.9 194 10/15/2025

Common 1.1.5.