EfCore.FastExtensions.SqlServer 0.0.13

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

๐Ÿš€ EF Core Fast Extensions

Entity Framework Core helpers that keep LINQ fully composable while generating optimized SQL for relational databases. The extensions target .NET 10/EF Core 10 and focus on SQL Server with fallbacks for other EF Core providers.

๐Ÿง  Features

  • โœ… ExecuteUpdateJoinAsync(...) โ€” translate navigation-heavy filters into JOIN-based UPDATE statements.
  • โœ… ExecuteDeleteJoinAsync(...) โ€” remove rows using the same translated JOIN filters.
  • โœ… ExecuteBulkInsertAsync(...) โ€” bulk copy when using SQL Server, or batched INSERT statements for other providers.
  • โœ… IncludeTempTable(...) โ€” join in-memory collections through temporary tables with INNER or LEFT semantics.
  • โœ… Async APIs with pure IQueryable composition and no raw SQL strings required from consumers.

๐Ÿ“ฆ Installation

dotnet add package EfCore.FastExtensions.SqlServer

๐Ÿ”ง Usage Examples

Join-based delete

var deleted = await db.Users
    .Include(u => u.State)
    .ThenInclude(s => s.Country)
    .Where(u => u.State!.StateCode == "AB")
    .ExecuteDeleteJoinAsync(CancellationToken.None);

Join-based update

var affected = await db.Users
    .Include(x => x.State)
    .ThenInclude(x => x.Country)
    .Where(u => u.Id == 1 && u.State!.Country.Id > 0)
    .ExecuteUpdateJoinAsync(
        x => x.SetProperty(p => p.Region, p => p.State!.StateName.ToUpper())
    );

Bulk insert (SQL Server optimized)

var newUsers = new List<User>
{
    new() { Name = "Ada", Email = "ada@example.com" },
    new() { Name = "Alan", Email = "alan@example.com" }
};

// Uses SqlBulkCopy on SQL Server, or batched INSERTs for other providers
var inserted = await db.Users.ExecuteBulkInsertAsync(newUsers, batchSize: 2000);

Joining in-memory data via temporary tables

using EfCore.FastExtensions.SqlServer.Enums;

var temporaryScores = new[]
{
    new { UserId = 1, Score = 82 },
    new { UserId = 2, Score = 91 }
};

var results = await db.Users
    .IncludeTempTable(user => user.Id, temporaryScores, score => score.UserId, SqlJoinType.Left)
    .ExecuteSelectAsync(user => new { user.Id, user.Email },
        (projection, score) => new
        {
            projection.Id,
            projection.Email,
            Score = score?.Score ?? 0
        });

๐Ÿงช Benchmark Snapshot

Performance comparison between EF Core CRUD operations and optimized JOIN extensions (from the SQL Server benchmarks in this repository):

Method Mean Error StdDev Median Allocated
Native EF Core Update 9.794 ms 0.6103 ms 1.800 ms 9.753 ms 475.92 KB
ExecuteUpdateJoinAsync (JOIN + SET + WHERE) 7.001 ms โœ… 0.3860 ms 1.120 ms 6.552 ms 149.49 KB โœ…
Native EF Core RemoveRange 20.866 ms โš  2.1838 ms 6.370 ms 18.531 ms 3.31 MB โš 
ExecuteDeleteJoinAsync 11.131 ms โœ… 0.4575 ms 1.349 ms 10.975 ms 138.04 KB โœ…

๐Ÿค Contributing

  • Fork the repository.
  • Create a branch (e.g., feature/your-feature).
  • Commit your code.
  • Push and open a Pull Request.
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
0.0.13 318 11/30/2025
0.0.12 233 11/30/2025
0.0.11 111 11/29/2025
0.0.10 114 11/29/2025
0.0.9 117 11/28/2025