VersaTul.Data.Bulk
1.0.6
Prefix Reserved
See the version list below for details.
dotnet add package VersaTul.Data.Bulk --version 1.0.6
NuGet\Install-Package VersaTul.Data.Bulk -Version 1.0.6
<PackageReference Include="VersaTul.Data.Bulk" Version="1.0.6" />
paket add VersaTul.Data.Bulk --version 1.0.6
#r "nuget: VersaTul.Data.Bulk, 1.0.6"
// Install VersaTul.Data.Bulk as a Cake Addin #addin nuget:?package=VersaTul.Data.Bulk&version=1.0.6 // Install VersaTul.Data.Bulk as a Cake Tool #tool nuget:?package=VersaTul.Data.Bulk&version=1.0.6
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 | Versions 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. |
-
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.