CodeLogic.MSSQL
4.6.82
dotnet add package CodeLogic.MSSQL --version 4.6.82
NuGet\Install-Package CodeLogic.MSSQL -Version 4.6.82
<PackageReference Include="CodeLogic.MSSQL" Version="4.6.82" />
<PackageVersion Include="CodeLogic.MSSQL" Version="4.6.82" />
<PackageReference Include="CodeLogic.MSSQL" />
paket add CodeLogic.MSSQL --version 4.6.82
#r "nuget: CodeLogic.MSSQL, 4.6.82"
#:package CodeLogic.MSSQL@4.6.82
#addin nuget:?package=CodeLogic.MSSQL&version=4.6.82
#tool nuget:?package=CodeLogic.MSSQL&version=4.6.82
CodeLogic.MSSQL
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 | Versions 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. |
-
net10.0
- CodeLogic (>= 4.0.0 && < 5.0.0)
- Microsoft.Data.SqlClient (>= 7.0.2)
- Microsoft.Data.SqlClient.Extensions.Azure (>= 7.0.2)
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.