Giter Site home page Giter Site logo

Comments (4)

JonathanMagnan avatar JonathanMagnan commented on July 28, 2024

Hello @fayilt ,

You simply need to specify a BatchTimeout. You can verify it with the logger:

using (var bulk = new BulkOperation<EntitySimple>())
{
	bulk.Connection = connection;
	bulk.DestinationTableName = "EntitySimple";
	
	var sb = new StringBuilder();
	bulk.Log = x => sb.AppendLine(x);
	bulk.BatchTimeout = 999;
	
	bulk.DeleteFromQuery(tests => tests.Where(x => x.ColumnInt > 0));

	var s = sb.ToString();
}

Let me know if that answers correctly to your question.

Best Regards,

Jon

from bulk-operations.

fayilt avatar fayilt commented on July 28, 2024

Thanks, that partially answers my question. We're using DeleteFromQuery extension method on IQueryable, I assume there is no way to specify timeout when using that? And what's the default timeout in that case?

from bulk-operations.

JonathanMagnan avatar JonathanMagnan commented on July 28, 2024

Hello @fayilt ,

The default timeout might depend on which library you are using.

The default timeout for:

  • Bulk Operations is 15s // default timeout
  • Entity Framework Extensions (EF Core) is 15s // default timeout
  • Entity Framework Extensions (EF6) is 180s // due to backward compatibility

To set the timeout for EFE, you simply need to set a command timeout as you normally do in Entity Framework:

EFCore: ctx.Database.SetCommandTimeout(777);
EF6: ctx.Database.CommandTimeout = 777;

Let me know if that answers all your questions.

Best Regards,

Jon

from bulk-operations.

JonathanMagnan avatar JonathanMagnan commented on July 28, 2024

Hello @fayilt ,

Since our last conversation, we haven't heard from you!

Don't hesitate to contact us if you have any questions.

Best regards,

Jon

from bulk-operations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.