RepoDb.AuroraDb.MySqlConnector.BulkOperations 0.0.1-alpha2

Prefix Reserved
This is a prerelease version of RepoDb.AuroraDb.MySqlConnector.BulkOperations.
dotnet add package RepoDb.AuroraDb.MySqlConnector.BulkOperations --version 0.0.1-alpha2
                    
NuGet\Install-Package RepoDb.AuroraDb.MySqlConnector.BulkOperations -Version 0.0.1-alpha2
                    
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="RepoDb.AuroraDb.MySqlConnector.BulkOperations" Version="0.0.1-alpha2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RepoDb.AuroraDb.MySqlConnector.BulkOperations" Version="0.0.1-alpha2" />
                    
Directory.Packages.props
<PackageReference Include="RepoDb.AuroraDb.MySqlConnector.BulkOperations" />
                    
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 RepoDb.AuroraDb.MySqlConnector.BulkOperations --version 0.0.1-alpha2
                    
#r "nuget: RepoDb.AuroraDb.MySqlConnector.BulkOperations, 0.0.1-alpha2"
                    
#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 RepoDb.AuroraDb.MySqlConnector.BulkOperations@0.0.1-alpha2
                    
#: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=RepoDb.AuroraDb.MySqlConnector.BulkOperations&version=0.0.1-alpha2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=RepoDb.AuroraDb.MySqlConnector.BulkOperations&version=0.0.1-alpha2&prerelease
                    
Install as a Cake Tool

<div align="center"> <a href="https://repodb.net/tutorial/get-started-auroradb-mysqlconnector/"><image src="AuroraDB.png" style="width:256px;" /></a> <br/> <span style="font-size:28px;font-weight:bold;"><a href="https://repodb.net/tutorial/get-started-auroradb-mysqlconnector/"><strong>RepoDb.AuroraDb.MySqlConnector.BulkOperations</strong></a></span> <br/> <span style="font-size:16px;">A high-performance data productivity platform for bulk operations on Amazon Aurora MySQL in .NET.</span> </div>


<br/>

AuroraDbBulkBuild AuroraDbBulkHome AuroraDbBulkVersion

RepoDb.AuroraDb.MySqlConnector.BulkOperations

A high-performant extension library of RepoDB that does bulk operations towards an Amazon Aurora MySQL database. It uses the AuroraDbBulkCopy class of RepoDb.Connector.AuroraDb.MySqlConnector (MySqlConnector MySqlBulkCopy, i.e. LOAD DATA LOCAL INFILE) to load the data into the database.

Important Pages

  • GitHub Home — core library and source code.
  • Website — full documentation, API reference, and blog.
  • Limitations — Aurora MySQL-specific caveats, including the bulk operations.

Core Features

Community

License

Apache-2.0 — Copyright © 2026 Michael Camara Pendon


Installation

Install-Package RepoDb.AuroraDb.MySqlConnector.BulkOperations

Then initialize the bootstrapper once at application startup:

GlobalConfiguration
    .Setup()
    .UseAuroraDb();

Async Methods

Every synchronous operation has a corresponding Async overload.

BulkInsert

Inserts a list of entities into the database in bulk. Returns the number of inserted rows.

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var customers = GetCustomers();
    var insertedRows = connection.BulkInsert<Customer>(customers);
}

Or via table-name:

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var customers = GetCustomers();
    var insertedRows = connection.BulkInsert("Customer", customers);
}

Or via a DataTable:

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var table = GetCustomersAsDataTable();
    var insertedRows = connection.BulkInsert("Customer", table);
}

Returning generated identities:

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var customers = GetCustomers(); // Id not set
    connection.BulkInsert<Customer>(customers, identityBehavior: AuroraDbBulkImportIdentityBehavior.ReturnIdentity);
    // customers[i].Id now holds the generated identity for each row
}

BulkMerge

Upserts a list of entities in bulk — inserts new rows and updates existing ones based on the defined qualifiers. Returns the number of affected rows.

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var customers = GetCustomers();
    var mergedRows = connection.BulkMerge<Customer>(customers);
}

Or with qualifiers:

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var customers = GetCustomers();
    var mergedRows = connection.BulkMerge<Customer>(customers, qualifiers: e => new { e.LastName, e.DateOfBirth });
}

Or via a DataTable:

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var table = GetCustomersAsDataTable();
    var mergedRows = connection.BulkMerge("Customer", table);
}

BulkUpdate

Updates existing rows in the database in bulk, matched by the defined qualifiers. Returns the number of updated rows.

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var customers = GetCustomers();
    var rows = connection.BulkUpdate<Customer>(customers);
}

Or with qualifiers:

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var customers = GetCustomers();
    var rows = connection.BulkUpdate<Customer>(customers, qualifiers: e => new { e.LastName, e.DateOfBirth });
}

BulkDelete

Deletes existing rows from the database in bulk, matched by the defined qualifiers. Returns the number of deleted rows.

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var customers = GetCustomers();
    var deletedRows = connection.BulkDelete<Customer>(customers);
}

Or with qualifiers:

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var customers = GetCustomers();
    var deletedRows = connection.BulkDelete<Customer>(customers, qualifiers: e => new { e.LastName, e.DateOfBirth });
}

BulkDeleteByKey

Deletes existing rows from the database in bulk, matched by their primary (or identity) key value alone — no entities or DataTable involved, just the list of key values to remove. Returns the number of deleted rows.

using (var connection = new AuroraDbConnection(ConnectionString))
{
    var primaryKeys = new [] { 10045L, 10046L, 10047L };
    var deletedRows = connection.BulkDeleteByKey("Customer", primaryKeys);
}

Notes

  • LOAD DATA LOCAL. The rows are loaded with LOAD DATA LOCAL INFILE, so the connection string needs AllowLoadLocalInfile=True and the server needs local_infile = 1 (off by default in MySQL 8.0; set it in the Aurora cluster parameter group). BulkMerge, BulkUpdate, BulkDelete, BulkDeleteByKey, and BulkInsert with ReturnIdentity stage the rows in a pseudo table before applying them.
  • No explicit transactions. A bulk operation that is given a transaction fails, because the underlying bulk copy of the connector cannot join a transaction. Inside a TransactionScope, a plain BulkInsert works, but the staged operations fail.
  • Data errors are warnings. With LOAD DATA LOCAL, MySQL turns duplicate keys, too-long values and NULLs in NOT NULL columns into warnings: the values are truncated or defaulted, and a duplicate key fails the call only after the other rows were inserted.

See the Limitations page for the details and the alternatives.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 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 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.1-alpha2 36 9/28/2026
0.0.1-alpha1 39 9/28/2026