N.EntityFrameworkCore.Extensions.SqlServer 10.0.5.3

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

N.EntityFrameworkCore.Extensions.SqlServer

latest version downloads

High-performance bulk data extensions for Entity Framework Core — SQL Server provider. Extends your DbContext with bulk operations, query-based DML, CSV export, and utility helpers — all without loading entities into memory.

Supported operations: BulkDelete · BulkFetch · BulkInsert · BulkMerge · BulkSaveChanges · BulkSync · BulkUpdate · Fetch · DeleteFromQuery · InsertFromQuery · UpdateFromQuery · QueryToCsvFile · SqlQueryToCsvFile

Supports: Multiple Schemas · Complex Properties · Value Converters · Transactions · Synchronous & Asynchronous Execution

Inheritance Models: Table-Per-Concrete · Table-Per-Hierarchy · Table-Per-Type


💬 Feedback & Feature Requests Found a bug or have an idea? Please open an issue on GitHub.


Installation

dotnet add package N.EntityFrameworkCore.Extensions.SqlServer

Setup

Call SetupEfCoreExtensions() in your DbContext.OnConfiguring override:

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    optionsBuilder
        .UseSqlServer("your-connection-string")
        .SetupEfCoreExtensions();
}

Usage

BulkInsert

var orders = new List<Order>();
for (int i = 0; i < 10000; i++)
    orders.Add(new Order { OrderDate = DateTime.UtcNow, TotalPrice = 2.99 });

dbContext.BulkInsert(orders);
await dbContext.BulkInsertAsync(orders);

BulkUpdate

var products = dbContext.Products.Where(o => o.Price < 5.35M).ToList();
foreach (var product in products) product.Price = 6M;

dbContext.BulkUpdate(products);
await dbContext.BulkUpdateAsync(products);

BulkDelete

var orders = dbContext.Orders.Where(o => o.TotalPrice < 5.35M).ToList();

dbContext.BulkDelete(orders);
await dbContext.BulkDeleteAsync(orders);

BulkMerge (Upsert)

BulkMergeResult<Product> result = dbContext.BulkMerge(products);
Console.WriteLine($"Inserted: {result.RowsInserted}, Updated: {result.RowsUpdated}");

BulkSync

BulkSyncResult<Product> result = dbContext.BulkSync(products);
Console.WriteLine($"Inserted: {result.RowsInserted}, Updated: {result.RowsUpdated}, Deleted: {result.RowsDeleted}");

DeleteFromQuery

dbContext.Products.Where(x => x.Price < 5.35M).DeleteFromQuery();
await dbContext.Products.Where(x => x.Price < 5.35M).DeleteFromQueryAsync();

InsertFromQuery

dbContext.Products
    .Where(x => x.Price < 10M)
    .InsertFromQuery("ProductsUnderTen", o => new { o.Id, o.Price });

UpdateFromQuery

dbContext.Products
    .Where(x => x.Price == 5.35M)
    .UpdateFromQuery(o => new Product { Price = 5.75M });

Transactions

using var transaction = dbContext.Database.BeginTransaction();
try
{
    dbContext.BulkInsert(orders);
    dbContext.BulkUpdate(products);
    transaction.Commit();
}
catch
{
    transaction.Rollback();
}

For full documentation including all options, result objects, and the complete API reference, see the main README.


Donations

  • 💳 PayPal: Donate via PayPal
  • Bitcoin: bc1qxqpymnf4gj22nt4wj3wy56ks48fw59v8y9sg9z
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 (1)

Showing the top 1 NuGet packages that depend on N.EntityFrameworkCore.Extensions.SqlServer:

Package Downloads
N.EntityFrameworkCore.Extensions

Meta-package that includes both N.EntityFrameworkCore.Extensions (SQL Server) and N.EntityFrameworkCore.Extensions.PostgreSql (PostgreSql). Extends your DbContext in EF Core with high-performance bulk operations: BulkDelete, BulkInsert, BulkMerge, BulkSync, BulkUpdate, Fetch, DeleteFromQuery, InsertFromQuery, UpdateFromQuery.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.5.3 0 5/27/2026
10.0.5.2 2,141 4/29/2026
10.0.5.1 100 4/29/2026