Linger.DataAccess.SqlServer
2.0.0-preview.5
dotnet add package Linger.DataAccess.SqlServer --version 2.0.0-preview.5
NuGet\Install-Package Linger.DataAccess.SqlServer -Version 2.0.0-preview.5
<PackageReference Include="Linger.DataAccess.SqlServer" Version="2.0.0-preview.5" />
<PackageVersion Include="Linger.DataAccess.SqlServer" Version="2.0.0-preview.5" />
<PackageReference Include="Linger.DataAccess.SqlServer" />
paket add Linger.DataAccess.SqlServer --version 2.0.0-preview.5
#r "nuget: Linger.DataAccess.SqlServer, 2.0.0-preview.5"
#:package Linger.DataAccess.SqlServer@2.0.0-preview.5
#addin nuget:?package=Linger.DataAccess.SqlServer&version=2.0.0-preview.5&prerelease
#tool nuget:?package=Linger.DataAccess.SqlServer&version=2.0.0-preview.5&prerelease
Linger.DataAccess.SqlServer
SQL Server provider for Linger.DataAccess, including the optional IBulkInsert capability.
Installation
dotnet add package Linger.DataAccess.SqlServer
Usage
using Linger.DataAccess;
using Linger.DataAccess.SqlServer;
using Microsoft.Data.SqlClient;
using var database = new SqlServerHelper(connectionString);
bool hasUser = await database.HasRowsAsync(
"SELECT 1 FROM dbo.Users WHERE Email = @email",
[new SqlParameter("@email", email)],
cancellationToken);
int nextId = await database.GetMaxIdAsync("UserId", "dbo.Users", cancellationToken);
IBulkInsert bulkInsert = database;
int written = await bulkInsert.BulkInsertAsync(
dataTable,
"dbo.Users",
batchSize: 2000,
timeout: 120,
cancellationToken);
BulkInsert validates and quotes each part of a qualified table name. GetMaxId is intended only for
single-writer scenarios; use IDENTITY or SEQUENCE when uniqueness must be guaranteed concurrently.
BulkInsert maps destination columns by DataTable column name and rejects execution inside a transaction opened
with BeginTrans.
BulkInsert and BulkInsertAsync use a separate connection and send batches of 1,000 rows by default. The success count excludes Deleted rows; an all-deleted input returns zero without opening a connection. They do not guarantee that the whole import is atomic: if a later batch fails, earlier batches may already be committed. Reconcile the destination by business key before retrying; replaying the entire input can duplicate rows. For an all-or-nothing import, use SqlBulkCopy with an explicit SqlTransaction on the same connection.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. 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 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. net11.0 is compatible. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Linger.DataAccess (>= 2.0.0-preview.5)
- Microsoft.Data.SqlClient (>= 7.1.2)
-
net10.0
- Linger.DataAccess (>= 2.0.0-preview.5)
- Microsoft.Data.SqlClient (>= 7.1.2)
-
net11.0
- Linger.DataAccess (>= 2.0.0-preview.5)
- Microsoft.Data.SqlClient (>= 7.1.2)
-
net8.0
- Linger.DataAccess (>= 2.0.0-preview.5)
- Microsoft.Data.SqlClient (>= 7.1.2)
-
net9.0
- Linger.DataAccess (>= 2.0.0-preview.5)
- Microsoft.Data.SqlClient (>= 7.1.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 |
|---|---|---|
| 2.0.0-preview.5 | 50 | 11/22/2026 |
| 2.0.0-preview.4 | 61 | 11/14/2026 |
| 2.0.0-preview.3 | 70 | 9/13/2026 |
| 2.0.0-preview.1 | 76 | 8/29/2026 |
| 1.6.4 | 155 | 8/16/2026 |
| 1.6.3 | 125 | 8/5/2026 |
| 1.6.2 | 143 | 8/2/2026 |
| 1.6.0 | 136 | 7/25/2026 |
| 1.5.5 | 133 | 7/23/2026 |
| 1.5.4-preview | 122 | 7/21/2026 |
| 1.5.3-preview | 122 | 7/20/2026 |
| 1.5.2-preview | 125 | 7/19/2026 |
| 1.5.1-preview | 124 | 7/15/2026 |
| 1.5.0-preview | 120 | 7/14/2026 |
| 1.4.4-preview | 117 | 6/16/2026 |
| 1.4.3-preview | 121 | 6/15/2026 |
| 1.4.2 | 148 | 5/20/2026 |
| 1.4.1-preview | 122 | 5/12/2026 |
| 1.4.0 | 126 | 5/6/2026 |
| 1.3.3-preview | 116 | 5/5/2026 |