Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghost1face/EntityFramework.BulkInsert
Fast bulk insert for EntityFramework6
https://github.com/ghost1face/EntityFramework.BulkInsert
bulk-inserts ef6 entity-framework mysql sql
Last synced: 1 day ago
JSON representation
Fast bulk insert for EntityFramework6
- Host: GitHub
- URL: https://github.com/ghost1face/EntityFramework.BulkInsert
- Owner: ghost1face
- License: apache-2.0
- Created: 2015-10-02T16:13:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-04T07:24:27.000Z (12 months ago)
- Last Synced: 2024-11-03T13:07:51.919Z (11 days ago)
- Topics: bulk-inserts, ef6, entity-framework, mysql, sql
- Language: C#
- Homepage:
- Size: 41.3 MB
- Stars: 122
- Watchers: 16
- Forks: 57
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# EntityFramework.BulkInsert
Updated port of EntityFramework.BulkInsert from the original version on the Codeplex site. This is not my original project, this is to keep it going and add minor updates and support. The original was hosted on Codeplex but later taken down. Since then the project has seen support for async IO, bug fixes, explicit transaction support and support for MySql.# NuGet
There are several NuGet packages available:
* EntityFramework6.BulkInsert [![NuGet](https://img.shields.io/nuget/v/EntityFramework6.BulkInsert.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/EntityFramework6.BulkInsert/)* EntityFramework6.BulkInsert.SqlServerCe [![NuGet](https://img.shields.io/nuget/v/EntityFramework6.BulkInsert.SqlServerCe.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/EntityFramework6.BulkInsert.SqlServerCe/)
* EntityFramework6.BulkInsert.MySql [![NuGet](https://img.shields.io/nuget/v/EntityFramework6.BulkInsert.MySql.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/EntityFramework6.BulkInsert.MySql/)
# Purpose
The purpose of this library is for performing Bulk Inserts using EntityFramework 6 and your existing `DbContext` instance to perform faster inserts instead of generating multiple insert statements for a collection of strongly typed objects.# Usage
```cs
IEnumerable cars = GenerateCars();using (var context = GetDbContext())
{
context.BulkInsert(cars);
}
```Async IO support is also built in:
```cs
IEnumerable cars = GenerateCars();using (var context = GetDbContext())
{
await context.BulkInsertAsync(cars);
}
```This library supports Explicit and Implicit transactions either using `IDbTransaction` or `TransactionScope`
# Building
To build/compile clone this repository and build:```
git clone https://github.com/ghost1face/EntityFramework.BulkInsert.git
```