EF With BatchUpdates

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
leolosi
Posts: 2
Joined: Tue 17 Apr 2012 21:36

EF With BatchUpdates

Post by leolosi » Tue 17 Apr 2012 21:43

Good evening,

I have a question about the dotConnect for MySQL with Entity Framework.
I looked at the documentation on how to use the method BatchUpdates but not get any relevant example.

I created an EF and insert the following lines of code.

MySqlEntityProviderConfig MySqlEntityProviderConfig.Instance = config;
config.SqlFormatting.Disable ();
config.DmlOptions.BatchUpdates.Enabled = true;
config.DmlOptions.BatchUpdates.AsynchronousBatch = true;
config.DmlOptions.BatchUpdates.BatchSize = 30;
config.DmlOptions.InsertNullBehaviour = InsertNullBehaviour.Omit;
config.DmlOptions.ReuseParameters = true;

However, the EF does not insert records into blocks of 30 lines.
Does anyone have a complete example of EF inserting records into blocks.

thank you

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 19 Apr 2012 14:49

I have just checked the BatchUpdates feature using your settings with dotConnect for MySQL v 6.80.341. It works. Refer to http://www.devart.com/blogs/dotconnect/ ... iders.html. Turn on the dbMonitor tool to check the SQL commands which are sent to the server (whether BatchUpdates works or not).
Download link: http://www.devart.com/dbmonitor/dbmon3.exe
Documentation: http://www.devart.com/dotconnect/mysql/ ... nitor.html

Does it help? Which version (x.xx.xxx) of dotConnect for MySQL are you using?

leolosi
Posts: 2
Joined: Tue 17 Apr 2012 21:36

Post by leolosi » Tue 24 Apr 2012 10:47

Shalex wrote:I have just checked the BatchUpdates feature using your settings with dotConnect for MySQL v 6.80.341. It works. Refer to http://www.devart.com/blogs/dotconnect/ ... iders.html. Turn on the dbMonitor tool to check the SQL commands which are sent to the server (whether BatchUpdates works or not).
Download link: http://www.devart.com/dbmonitor/dbmon3.exe
Documentation: http://www.devart.com/dotconnect/mysql/ ... nitor.html

Does it help? Which version (x.xx.xxx) of dotConnect for MySQL are you using?

Hello Shalex,

I am using Devart version 5.0.382.0.

I am using the Entity Framework (EDMX) native. NET platform and want to integrate it with the option BatchUpdates Provider Devart.

Is this possible?

Tested by DBMonitor but does not work, BatchUpdates works only with EF (EDML)?

thank you

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 26 Apr 2012 11:14

Batch Updates works with both EDMX and EDML models. Please make sure that Batch Updates limitations are not applied to your case: http://www.devart.com/blogs/dotconnect/ ... imitations.

Post Reply