DKX.Pg
2.6.0
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DKX.Pg --version 2.6.0
NuGet\Install-Package DKX.Pg -Version 2.6.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="DKX.Pg" Version="2.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DKX.Pg" Version="2.6.0" />
<PackageReference Include="DKX.Pg" />
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 DKX.Pg --version 2.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DKX.Pg, 2.6.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 DKX.Pg@2.6.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=DKX.Pg&version=2.6.0
#tool nuget:?package=DKX.Pg&version=2.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DKX.Pg
PostgreSQL only client with something better than query builder or LINQ (hint: pure SQL is better)
- PostgreSQL only
- Async only
- Immutable entities
- Opening connection automatically when needed
- Automatic nested transactions (with savepoints)
- Plain SQL with snippets
- .net 5 only
Installation
Install main package:
$ dotnet add package DKX.Pg
$ dotnet add package DKX.Pg.AOT
Example
using DKX.Pg;
using DKX.Pg.Entities;
using DKX.Pg.Metadata;
[Entity]
public partial class User
{
[Id, Generated]
public int Id { get; }
public string Email { get; }
}
await using var db = new Connection(new NpgsqlConnection(connectionString), new AssemblyEntitiesMetadataProvider(assemblyWithEntities));
var email = "john@doe.com";
var query = db.Query($"SELECT id, email FROM users WHERE email = {email}"); // <- No worry, that is not "SQL injection ready" query, read more ;-)
// SQL: SELECT id, email FROM users WHERE email = $1
var user = await query.GetSingleResult<User>();
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net5.0
- Npgsql (>= 6.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 | |
|---|---|---|---|
| 2.11.0 | 7,482 | 5/2/2022 | |
| 2.10.0 | 661 | 5/2/2022 | |
| 2.9.0 | 747 | 4/24/2022 | |
| 2.8.0 | 649 | 4/23/2022 | |
| 2.7.1 | 660 | 4/23/2022 | |
| 2.7.0 | 666 | 4/23/2022 | |
| 2.6.0 | 673 | 4/23/2022 | |
| 2.5.0 | 643 | 4/22/2022 | |
| 2.4.1 | 1,398 | 2/25/2022 | |
| 2.4.0 | 690 | 2/25/2022 | |
| 2.3.0 | 1,214 | 12/15/2021 | |
| 2.2.0 | 543 | 12/15/2021 | |
| 2.1.0 | 3,249 | 11/25/2021 | |
| 2.0.1 | 1,156 | 9/15/2021 | |
| 2.0.0 | 681 | 9/12/2021 | |
| 2.0.0-alpha.14 | 395 | 9/11/2021 | |
| 2.0.0-alpha.13 | 390 | 9/11/2021 | |
| 2.0.0-alpha.12 | 726 | 8/10/2021 | |
| 2.0.0-alpha.11 | 346 | 8/10/2021 | |
| 2.0.0-alpha.10 | 355 | 8/10/2021 | |
| 2.0.0-alpha.9 | 345 | 8/9/2021 | |
| 2.0.0-alpha.8 | 338 | 8/6/2021 | |
| 2.0.0-alpha.7 | 335 | 8/6/2021 | |
| 2.0.0-alpha.6 | 357 | 8/6/2021 | |
| 2.0.0-alpha.5 | 344 | 8/6/2021 | |
| 2.0.0-alpha.4 | 359 | 8/6/2021 | |
| 2.0.0-alpha.3 | 369 | 8/6/2021 | |
| 2.0.0-alpha.2 | 337 | 8/6/2021 | |
| 2.0.0-alpha.1 | 339 | 8/6/2021 | |
| 1.2.0 | 1,399 | 5/29/2021 | |
| 1.1.0 | 686 | 5/16/2021 | |
| 1.0.1 | 586 | 5/16/2021 | |
| 1.0.0 | 641 | 5/16/2021 | |
| 0.0.1-alpha.14 | 500 | 4/17/2021 | |
| 0.0.1-alpha.13 | 421 | 4/11/2021 | |
| 0.0.1-alpha.12 | 367 | 4/10/2021 | |
| 0.0.1-alpha.11 | 640 | 3/5/2021 | |
| 0.0.1-alpha.10 | 371 | 2/25/2021 | |
| 0.0.1-alpha.9 | 377 | 2/25/2021 | |
| 0.0.1-alpha.8 | 406 | 2/25/2021 | |
| 0.0.1-alpha.7 | 415 | 2/24/2021 | |
| 0.0.1-alpha.6 | 375 | 2/23/2021 | |
| 0.0.1-alpha.5 | 363 | 2/22/2021 | |
| 0.0.1-alpha.4 | 344 | 2/17/2021 | |
| 0.0.1-alpha.3 | 350 | 2/17/2021 | |
| 0.0.1-alpha.2 | 341 | 2/16/2021 | |
| 0.0.1-alpha.1 | 338 | 2/16/2021 |