EFCore.ReturningExtensions.Npgsql
9.2.3
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 EFCore.ReturningExtensions.Npgsql --version 9.2.3
NuGet\Install-Package EFCore.ReturningExtensions.Npgsql -Version 9.2.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="EFCore.ReturningExtensions.Npgsql" Version="9.2.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EFCore.ReturningExtensions.Npgsql" Version="9.2.3" />
<PackageReference Include="EFCore.ReturningExtensions.Npgsql" />
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 EFCore.ReturningExtensions.Npgsql --version 9.2.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EFCore.ReturningExtensions.Npgsql, 9.2.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 EFCore.ReturningExtensions.Npgsql@9.2.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=EFCore.ReturningExtensions.Npgsql&version=9.2.3
#tool nuget:?package=EFCore.ReturningExtensions.Npgsql&version=9.2.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
EF Core Returning Extensions
Features
- 🚀 Single Round Trip - Retrieve affected rows without additional SELECT queries
Installation
.NET CLI
dotnet add package EFCore.ReturningExtensions.Npgsql
Usage
Configure
public class ItemsDbContext(DbContextOptions<ItemsDbContext> options) : DbContext(options)
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseNpgsql(connectionString, o =>
{
o.UseReturningExtensions();
});
}
}
Update
To get updated
var updatedItems = dbContext.Items
.AsNoTracking()
.Where(x => x.Name.Length < 100)
.Updated(s => s.SetProperty(p => p.Name, p => p.Name + "_suffix"), x => x)
.ToList();
or to get previous values
var previousItems = dbContext.Items
.AsNoTracking()
.Where(x => x.Name.Length < 100)
.Updated(s => s.SetProperty(p => p.Name, p => p.Name + "_suffix"), (x, y) => y)
.ToList();
or to get mixed values
var itemChanges = dbContext.Items
.AsNoTracking()
.Where(x => x.Name.Length < 100)
.Updated(s => s.SetProperty(p => p.Name, p => p.Name + "_suffix"), (x, y) => new { Change = y.Name + "|>" + x.Name })
.ToList();
Delete
var deletedItems = dbContext.Items
.AsNoTracking()
.Where(x => x.Name.Length < 100)
.Deleted(x => x)
.ToList();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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.
-
net9.0
- EFCore.ReturningExtensions (>= 9.2.3)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 9.0.0 && < 10.0.0)
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 | |
|---|---|---|---|
| 11.0.0 | 55 | 11/11/2026 | |
| 10.2.4 | 83 | 11/10/2026 | |
| 10.2.3 | 119 | 11/5/2026 | |
| 10.2.2 | 110 | 11/3/2026 | |
| 10.2.1 | 125 | 10/28/2026 | |
| 10.2.0 | 113 | 10/20/2026 | |
| 10.1.1 | 157 | 7/22/2026 | |
| 10.1.0 | 142 | 7/20/2026 | |
| 9.2.4 | 79 | 11/10/2026 | |
| 9.2.3 | 107 | 11/5/2026 | |
| 9.2.2 | 102 | 11/3/2026 | |
| 9.2.1 | 115 | 10/28/2026 | |
| 9.2.0 | 107 | 10/20/2026 | |
| 8.2.4 | 74 | 11/10/2026 | |
| 8.2.3 | 103 | 11/5/2026 | |
| 8.2.2 | 113 | 11/3/2026 | |
| 8.2.1 | 114 | 10/28/2026 | |
| 8.2.0 | 107 | 10/20/2026 | |
| 8.1.1 | 145 | 7/22/2026 | |
| 8.1.0 | 136 | 7/20/2026 |
Loading failed