Syrx.SqlServer.Extensions 2.4.0

dotnet add package Syrx.SqlServer.Extensions --version 2.4.0                
NuGet\Install-Package Syrx.SqlServer.Extensions -Version 2.4.0                
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="Syrx.SqlServer.Extensions" Version="2.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Syrx.SqlServer.Extensions --version 2.4.0                
#r "nuget: Syrx.SqlServer.Extensions, 2.4.0"                
#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.
// Install Syrx.SqlServer.Extensions as a Cake Addin
#addin nuget:?package=Syrx.SqlServer.Extensions&version=2.4.0

// Install Syrx.SqlServer.Extensions as a Cake Tool
#tool nuget:?package=Syrx.SqlServer.Extensions&version=2.4.0                

Syrx.SqlServer

This project provides Syrx support for SqlServer. The overall experience of using Syrx remains the same. The only difference should be during dependency registration.

Installation

[!TIP] We recommend installing the Extensions package which includes extension methods for easier configuration.

Source Command
.NET CLI dotnet add package Syrx.SqlServer.Extensions
Package Manager Install-Package Syrx.SqlServer.Extensions
Package Reference <PackageReference Include="Syrx.SqlServer.Extensions" Version="2.4.0" />
Paket CLI paket add Syrx.SqlServer.Extensions --version 2.4.0

However, if you don't need the configuration options, you can install the standalone package via nuget.

Source Command
.NET CLI dotnet add package Syrx.SqlServer
Package Manager Install-Package Syrx.SqlServer
Package Reference <PackageReference Include="Syrx.SqlServer" Version="2.4.0" />
Paket CLI paket add Syrx.SqlServer --version 2.4.0

Extensions

The Syrx.SqlServer.Extensions package provides dependency injection support via extension methods.

// add a using statement to the top of the file or in a global usings file.
using Syrx.Commanders.Databases.Connectors.SqlServer.Extensions;

public static IServiceCollection Install(this IServiceCollection services)
{
    return services
        .UseSyrx(factory => factory         // inject Syrx
        .UseSqlServer(builder => builder        // using the SqlServer implementation
            .AddConnectionString(/*...*/)   // add/resolve connection string details 
            .AddCommand(/*...*/)            // add/resolve commands for each type/method
            )
        );
}

Credits

Syrx is inspired by and build on top of Dapper.
SqlServer support is provided by Microsoft.Data.SqlClient.

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. 
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
2.4.0 36 1/19/2025
2.2.0 95 11/22/2024
2.1.0 91 11/15/2024
2.0.0 115 7/5/2024

Last release on .NET8.0 exclusively. Next release will include .NET9.0.