Synergit.Common 3.0.0

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

Synergit.Common

Common library of Synergit s.r.o.: a thin database client and general helpers.

Targets: .NET 10, .NET Framework 4.8.

Data access (Synergit.Data)

Db is a thin wrapper over ADO.NET: no ORM, no reflection mapping. Rows are read into DbRow and mapped explicitly, typically in a DTO constructor. Use a provider package, e.g. Synergit.Data.MsSql (MsSqlDb).

using var db = new MsSqlDb(server, database, user, password);

// .NET 10: interpolated values are sent as parameters
var row = db.QueryRow($"SELECT * FROM dbo.Users WHERE ID = {id} AND Code = {code:varchar(20)}");
var users = db.QueryRows($"SELECT * FROM dbo.Users WHERE ID IN ({ids})", r => new UserItem(r));

// all targets: explicit parameters
var name = db.GetValue("SELECT Name FROM dbo.Users WHERE ID = @id", [db.CreateParameter("@id", id)]);
  • Execute, QueryValue, QueryRow, QueryRows, QueryValueToStream (+ Async): SqlQuery interpolated string, .NET 10 only.
  • ExecSQL, GetValue, GetRow, GetRows, CopyValueToStream (+ Async): SQL text with optional DbParameter list.
  • DbRow: lenient AsString, AsInteger, AsNInteger, AsDecimal, AsDateTime, AsChar, AsEnum … (NULL → default), strict GetStrict<T> (throws on NULL or lossy conversion).
  • CreateParameter(name, value, DbType, size, precision, scale) for varchar and decimal columns, see XML docs why.
  • Format* methods create SQL literals for dynamically built SQL, prefer parameters.

Helpers (Synergit)

Utils (password hashing, encryption, command line), Extensions (string, byte[] and type extensions), Config, DisposableObject.

Breaking changes in 3.0

  • GetValueFromDB / GetRowFromDB / GetRowsFromDB renamed to GetValue / GetRow / GetRows.
  • Errors raised by statements after the first result set are thrown (were silently ignored).
  • Format* and DbRow conversions use the invariant culture.
  • Invalid arguments throw ArgumentException instead of Exception.
Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
.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.
  • .NETFramework 4.8

    • No dependencies.
  • net10.0-windows7.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Synergit.Common:

Package Downloads
Synergit.Data.MsSql

Library of MS SQL DB Thin Client for Synergit s.r.o. company

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 55 11/16/2026
2.4.1 175 1/15/2026
2.4.0 139 1/15/2026
2.2.0 233 1/9/2025
2.1.1 206 11/25/2024