EntityFramework.BulkInsert.SqlServerCe error

971 views Asked by At

I've used Entity Framework with SQL Server CE in a project and I need to insert a large number of records into a table at a moment. So I Googled for a Bulk insert with Entity Framework and I found this package on Nuget that is a package for insert bulk insert using EF and SQL Server CE.

I've simply used this code:

  EntityFramework.BulkInsert.ProviderFactory
                    .Register<EntityFramework.BulkInsert.SqlServerCe.SqlCeBulkInsertProvider>("System.Data.SqlServerCe.SqlCeConnection");
  context.BulkInsert(tableInformation);
  context.SaveChanges();

But it didn't work properly and I've get this error:

Additional information: Method 'Run' in type 'EntityFramework.BulkInsert.SqlServerCe.SqlCeBulkInsertProvider' from assembly 'EntityFramework.BulkInsert.SqlServerCe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=630a17433349cb76' does not have an implementation.

I try to search for the error but I can't find any related result. Also I look at its documentation but there wasn't any sample or guidance for using SQL Server CE with its provider.

1

There are 1 answers

5
ErikEJ On BEST ANSWER

Use ErikEJ.SqlCeBulkCopy, available via NuGet or on CodePlex