PgYeet 1.0.0

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

PgYeet

High-throughput PostgreSQL bulk inserts for Entity Framework Core, powered by Npgsql binary COPY. PgYeet reads table, column, store-type, and value-converter metadata from your existing EF model—no duplicate mapping and no bulk-specific attributes.

Install

dotnet add package PgYeet --version 1.0.0
<PackageReference Include="PgYeet" Version="1.0.0" />

PgYeet 1.0 targets .NET 10:

Target framework EF Core Npgsql EF Core provider
net10.0 10.x 10.x

Requires EF Core 10.0.12+ and Npgsql/provider 10.0.3+ within their 10.x lines. The package targets only net10.0 and bounds dependencies below the next major version.

Quick start

using PgYeet;

var users = new[]
{
    new User { Name = "Ada", Email = "ada@example.com" },
    new User { Name = "Alan", Email = "alan@example.com" }
};

var inserted = await db.Users.YeetAsync(users, ct: cancellationToken);

// For a supported identity/serial key, generated values are now assigned:
Console.WriteLine(users[0].Id);

If generated values are not needed in memory, choose the direct streaming path instead:

var inserted = await db.Users.YeetAsync(
    users,
    returnGeneratedKeys: false,
    ct: cancellationToken);

These examples are alternatives; calling both inserts the rows twice.

Execution paths

Path Database work Input CLR keys
Generated keys Temp-table COPY, then INSERT … RETURNING Buffered when a supported identity exists Assigned to the objects
Direct One binary COPY into the target table Enumerated once Left unchanged

YeetAsync executes immediately and bypasses EF Core change tracking and SaveChanges. Use new or detached objects; do not call Add or AddRange first. PgYeet can assign generated key properties, but it does not attach the objects or change their EntityState.

Generated-key input must contain distinct, non-null object references. A repeated reference cannot receive two different keys unambiguously and is rejected before database I/O. Before COPY begins, PgYeet also verifies the actual PostgreSQL backing sequence is present, positive-increment, and non-cyclic.

An existing DbContext transaction is honored. Without one, the generated-key path owns a transaction and the direct path is a single atomic PostgreSQL statement. If an ambient transaction is rolled back after a successful call, the CLR objects still retain those values. A failed generated-key call rolls back to its own savepoint inside the caller's transaction and attempts to restore the original keys.

Supported scope

PgYeet supports:

  • one entity mapped to one PostgreSQL table;
  • scalar CLR-backed properties and nullable values;
  • EF value converters;
  • caller-assigned keys, including Guid;
  • single-column integer identity/serial key write-back;
  • integer-backed strongly typed identities with an EF converter.

Computed columns are omitted. CLR-backed properties with database defaults are not omitted: PgYeet writes the current property value, so EF Core's SaveChanges sentinel behavior does not apply.

Owned and complex types, inheritance/table splitting, required shadow properties without a database value, field-only properties, identity keys without a CLR getter/setter, composite generated keys, descending/cyclic identities, non-key identity columns, and non-identity store-generated keys are outside the 1.0 contract. Identity-rewriting BEFORE INSERT triggers are also unsupported because returned keys cannot be correlated safely with the input objects. PostgreSQL rejects direct COPY FROM into an RLS-enabled target for an ordinary non-bypass role. The generated-key path instead uses INSERT for the target and is subject to its normal RLS policy. PgYeet implements insert only; it does not update, delete, upsert, synchronize graphs, or support providers other than PostgreSQL/Npgsql.

Learn more

Product Compatible and additional computed target framework versions.
.NET 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. 
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
1.0.0 119 9/13/2026
0.2.1 212 7/2/2026
0.2.0 136 7/2/2026
0.1.0 138 6/15/2026