如何使用EntityFramework.BulkInsert?如何使用、EntityFramework、BulkInsert

2023-09-03 01:13:04 作者:小布丁陪着我

我试图用EntityFramework.BulkInsert位于 HTTP://efbulkinsert.$c$cplex。 COM / 。这对实体框架的延伸。

我安装了正确的NuGet包,并添加使用EntityFramework.BulkInsert 来我班上名列前茅。当我做了一个 context.BulkInsert(实体)BulkInsert有一条红线之下,就好像它不存在。有人可以帮助我在这个扩展的正确使用?我以前没有用过的扩展方法。您应该能够只是做到这一点:

  context.BulkInsert(实体);
 

解决方案

您需要添加

 使用EntityFramework.BulkInsert.Extensions;
 
用Way.EntityDB进行Entity Framework Core数据库建模

你的班上名列前茅

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);

解决方案

You need to add

using EntityFramework.BulkInsert.Extensions;

to the top of your class