Zonkey.Data.MsSql 7.0.3

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

Zonkey.Data.MsSql

SQL Server-specific extensions for Zonkey.Data. Provides Microsoft.Data.SqlClient integration and XML query support.

Installation

dotnet add package Zonkey.Data.MsSql

Requires: Zonkey.Data, Microsoft.Data.SqlClient

Setup

Call Initialize() at application startup:

using Zonkey;

MsSqlExtension.Initialize();

This registers the Microsoft.Data.SqlClient connection factory and configures proper SqlDbType.Time parameter handling.

Features

Provider Registration

Registers Microsoft.Data.SqlClient.SqlConnection with Zonkey's dialect system so the SQL Server dialect is automatically selected.

SqlXmlAdapter

Work with SQL Server's FOR XML queries:

using Zonkey.SqlServer;

var xmlAdapter = new SqlXmlAdapter(sqlConnection);
var doc = await xmlAdapter.GetXmlDocument("root",
    "SELECT * FROM products FOR XML PATH('product')", false);

Methods:

  • GetXmlDocument() -- returns XmlDocument with wrapped root element
  • FillXmlNode() -- populates an existing XML node
  • GetXmlString() -- returns raw XML string

Target Frameworks

  • .NET 8.0
  • .NET 10.0
  • .NET Framework 4.8

Documentation

See the database providers guide for dialect details and the full documentation.

Product 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 was computed.  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. 
.NET Framework net48 is compatible.  net481 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
7.0.3 58 8/13/2026
7.0.1 91 8/6/2026
7.0.0 100 7/30/2026
6.5.0.5000-rc2 192 3/26/2025
6.2.1.2000 3,214 2/10/2025
6.1.0.1700 469 12/30/2022
6.0.0.1600 450 8/14/2022

Zonkey 7.0.3 makes SqlFilter.IN's Value setter functional (replacing the IN list with construction-time normalization; a scalar becomes a single-element list) and caches the collection-parameter typed array so ToString and AddToCommandParams scan the list once.

Zonkey 7.0.2 adds SqlFilter.IN for the composable filter surface, with the same semantics as the where-expression Contains() translation: an empty or all-null list renders a commented "1 = 0", a single value collapses to an equality, and a multi-value list binds as one typed-array collection parameter on dialects that support it (PostgreSQL: "field = ANY(:pN)") or as individually suffixed parameters ("field IN (:pN_0, :pN_1, ...)") everywhere else.

Zonkey 7.0.1 adds symmetric DateOnly/TimeOnly conversions: providers that surface date/time columns as DateOnly/TimeOnly (notably Npgsql 10) now fill DateTime, TimeSpan, and string properties correctly on both materialization paths, DateOnly/TimeOnly property values round-trip to all supported databases, date/time-ish values destined for string properties render as round-trip ISO strings instead of culture-specific text, and TimeSpan properties now fill from string (standard "d.hh:mm:ss" TimeSpan.Parse forms, e.g. text-backed SQLite time columns) and DateTime (time-of-day) sources.

7.0.1 also reworks IN-list translation: a single value now renders as "col = @p0" rather than "col IN (@p0)"; PostgreSQL binds a list of two or more as one array parameter ("col = ANY($0)") at any size, removing the parameter-count ceiling there; a null in the list never matches, following SQL IN semantics rather than C# Contains semantics; and an empty or all-null list renders a commented "1 = 0". SplitList() is obsolete on .NET 6 and later in favour of System.Linq's Chunk(), and remains supported on .NET Framework 4.8, which has no Chunk. See the "Translation policy" section of docs/querying.md.

Zonkey 7.0 is a major release with breaking changes. Packages now target .NET 8, .NET 10, and .NET Framework 4.8 (Zonkey.Text targets .NET Standard 2.0 and .NET Framework 4.8), and assemblies are no longer strong-name signed. Applications on .NET 7 or earlier (including .NET 5/6 and .NET Core), on .NET Framework before 4.8, or requiring strong-named assemblies should stay on the latest v6.x release. See https://github.com/kellybirr/zonkey for full documentation, and see the repository README's "Breaking Changes from v6.x" section for the complete list of API changes (such as WithTransaction) and WHERE-expression behavior changes. FillRange paging on SQL Server now uses OFFSET/FETCH and requires SQL Server 2012 or later.