VersaTul.Data.Bulk 1.0.4

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package VersaTul.Data.Bulk --version 1.0.4                
NuGet\Install-Package VersaTul.Data.Bulk -Version 1.0.4                
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="VersaTul.Data.Bulk" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VersaTul.Data.Bulk --version 1.0.4                
#r "nuget: VersaTul.Data.Bulk, 1.0.4"                
#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.
// Install VersaTul.Data.Bulk as a Cake Addin
#addin nuget:?package=VersaTul.Data.Bulk&version=1.0.4

// Install VersaTul.Data.Bulk as a Cake Tool
#tool nuget:?package=VersaTul.Data.Bulk&version=1.0.4                

VersaTul Data Bulk

VersaTul Data Bulk is a project that provides the ability to setup bulk coping functionality for copying data to and from different data sources.

Features

  • Common interfaces and implementations for database or data source specific copiers
  • Customizable batch size and streaming options
  • Support for flat file and IDataReader sources

Usage

To use VersaTul Data Bulk, you need to implement the IBulkCopy interface and provide the necessary parameters for the source and destination data sources. You also need to create a collection of CopyDetail objects that represent the details of the bulk copy, such as the source column, destination column, source ordinal, and destination ordinal. Then, you can call the DoCopy method to perform the bulk copy operation.

Here is a simple example using a flat file as the source:

// Create a flat file bulk copy object
FlatFileBulkCopy flatFileBulkCopy = new FlatFileBulkCopy();

// Create a collection of copy details
List<CopyDetail> copyDetails = new List<CopyDetail>();

// Add a copy detail for each column
copyDetails.Add(new CopyDetail("Name", "Name", 0, 0));
copyDetails.Add(new CopyDetail("Age", "Age", 1, 1));
copyDetails.Add(new CopyDetail("Gender", "Gender", 2, 2));

// Set the batch size and enable streaming
flatFileBulkCopy.BatchSize = 1000;
flatFileBulkCopy.EnableStreaming = true;

// Perform the bulk copy
flatFileBulkCopy.DoCopy(copyDetails);

Here is a simple example using an IDataReader as the source:

// Create a data reader bulk copy object
DataReaderBulkCopy dataReaderBulkCopy = new DataReaderBulkCopy();

// Create a collection of copy details
List<CopyDetail> copyDetails = new List<CopyDetail>();

// Add a copy detail for each column
copyDetails.Add(new CopyDetail("Name", "Name", 0, 0));
copyDetails.Add(new CopyDetail("Age", "Age", 1, 1));
copyDetails.Add(new CopyDetail("Gender", "Gender", 2, 2));

// Set the batch size and enable streaming
dataReaderBulkCopy.BatchSize = 1000;
dataReaderBulkCopy.EnableStreaming = true;

// Create a data reader from a data source
IDataReader dataReader = ...;

// Perform the bulk copy
dataReaderBulkCopy.DoCopy(dataReader, copyDetails);

License

This project is licensed under the MIT License - see the LICENSE file for details.

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on VersaTul.Data.Bulk:

Package Downloads
VersaTul.Data.MsSql

The VersaTul Data MsSql project provides the ability to quickly create database access objects, usable on Microsoft SQL Server databases. This project is built on top of a combination of System.Data.Common and System.Data.SqlClient namespaces. These are used to provide the functionality to quickly call stored procedures or plain text sql queries, and map the result into data objects using the provided helper methods. The project also provides MsSql Bulk Copy functionality, which can be use to bulk insert data into a MsSQL Server databases.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.7 94 11/14/2024
1.0.6 81 11/12/2024
1.0.5 186 4/20/2024
1.0.4 196 3/1/2024
1.0.3 139 2/2/2024
1.0.2 322 11/13/2023
1.0.1 163 11/13/2023