Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
488 views
in Technique[技术] by (71.8m points)

c# - How to use EntityFramework.BulkInsert?

I'm trying to use EntityFramework.BulkInsert located at http://efbulkinsert.codeplex.com/. It's an extension for Entity Framework.

I installed the proper NuGet package and added using EntityFramework.BulkInsert to the top of my class. When I go to do a context.BulkInsert(entities) "BulkInsert" has a red line underneath as if it doesn't exist. Can someone help me in the proper usage of this extension? I haven't used an extension method before. You are supposed to be able to just do this:

context.BulkInsert(entities);
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You need to add

using EntityFramework.BulkInsert.Extensions;

to the top of your class


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...