CodeLogic.MSSQL 4.6.82

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

CodeLogic.MSSQL

NuGet

Typed SQL Server 2019+ and Azure SQL data access for CodeLogic 4: repositories, LINQ-shaped queries, stable paging, schema synchronization, migrations, caching, resilience, and operational diagnostics.

dotnet add package CodeLogic.MSSQL
using CL.MSSQL;
using CL.MSSQL.Models;

[Table(Name = "users", Schema = "dbo")]
public sealed class User
{
    [Column(DataType = DataType.BigInt, Primary = true, AutoIncrement = true)]
    public long Id { get; set; }

    [Column(DataType = DataType.NVarChar, Size = 160, Unique = true, NotNull = true)]
    public string Email { get; set; } = "";

    [Column(DataType = DataType.DateTime2, NotNull = true)]
    public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;
}

await Libraries.LoadAsync<MSSQLLibrary>();
await CodeLogic.ConfigureAsync();
await CodeLogic.StartAsync();

var mssql = Libraries.Get<MSSQLLibrary>()!;
await mssql.SyncTableAsync<User>();
var inserted = await mssql.GetRepository<User>().InsertAsync(new User { Email = "ada@example.com" });
var recent = await mssql.Query<User>()
    .Where(user => user.CreatedUtc >= DateTime.UtcNow.AddDays(-7))
    .OrderByDescending(user => user.CreatedUtc)
    .Take(20)
    .ToListAsync();

Configuration lives in config.mssql.json. Structured SQL-login and integrated-security settings are supported; an explicit connectionString overrides them and enables all Microsoft.Data.SqlClient authentication modes, including Microsoft Entra authentication. The package includes the matching Microsoft.Data.SqlClient.Extensions.Azure 7.x provider required by SqlClient 7.

{
  "databases": {
    "Default": {
      "enabled": true,
      "host": "localhost",
      "port": 1433,
      "database": "app",
      "authenticationMode": "sqlLogin",
      "username": "app_user",
      "password": "secret",
      "encrypt": true,
      "trustServerCertificate": false,
      "defaultSchema": "dbo",
      "syncMode": "production"
    }
  }
}

Highlights include OUTPUT INSERTED identity handling, dynamically parameter-capped batches, non-MERGE serializable upserts, TOP/OFFSET … FETCH, SQL Server-native type inference and JSON checks, sys.* catalog schema management, sp_getapplock, catalog DDL snapshots, transient Azure retry, and cached estimated ShowPlan XML capture.

See the full documentation and capability parity matrix.

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

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
4.6.82 31 8/8/2026

# Changelog

## Unreleased

- Initial `CodeLogic.MSSQL` release for SQL Server 2019+, SQL Server 2022/2025, and Azure SQL Database.
- Added repository, fluent-query, projection, grouping, paging, transaction, raw SQL, cache, health, migration, retention, backup, and named-connection workflows matching `CL.MySQL2`.
- Added SQL Server-native mappings, schemas, identity output, parameter-capped batches, lock-based non-`MERGE` upserts, `sys.*` schema management, application locks, transient retry, and estimated-plan capture.