AuroraDbBulkInsertMapItem

A class that is being used to define a mapping for the bulk operations against Aurora MySQL.

This class defines a source-to-destination column mapping for the bulk operations against Aurora MySQL, with an optional explicit AuroraDbType override per mapping.

Constructors

Signature Description
AuroraDbBulkInsertMapItem(sourceColumn, destinationColumn) Maps a source column/property to a destination column, inferring the driver type from the entity property’s [AuroraDbType] attribute (if present) or the CLR value.
AuroraDbBulkInsertMapItem(sourceColumn, destinationColumn, AuroraDbType?) Same, with an explicit AuroraDbType override.

Properties

Name Description
AuroraDbType Gets the explicit AuroraDbType value to be used when writing, if provided.

Usability

var mappings = new List<AuroraDbBulkInsertMapItem>();
mappings.Add(new AuroraDbBulkInsertMapItem("SourceId", "DestinationId"));

using (var connection = new AuroraDbConnection(connectionString))
{
    var insertedRows = connection.BulkInsert(people, mappings: mappings);
}