diff --git a/samples/Sample.Kafka.MySql/Controllers/ValuesController.cs b/samples/Sample.Kafka.MySql/Controllers/ValuesController.cs index 9535b1d..1f4adeb 100644 --- a/samples/Sample.Kafka.MySql/Controllers/ValuesController.cs +++ b/samples/Sample.Kafka.MySql/Controllers/ValuesController.cs @@ -1,7 +1,6 @@ using System; using System.Data; using System.Data.SqlClient; -using System.Transactions; using Dapper; using DotNetCore.CAP; using Microsoft.AspNetCore.Mvc; @@ -30,7 +29,6 @@ namespace Sample.Kafka.MySql.Controllers [Route("~/adonet/transaction")] public IActionResult AdonetWithTransaction() { - //NOTE: Add `IgnoreCommandTransaction=true;` to your connection string, see https://github.com/mysql-net/MySqlConnector/issues/474 using (var connection = new SqlConnection(Startup.ConnectionString)) { using (var transaction = connection.BeginTransaction(_capBus, autoCommit: false)) diff --git a/samples/Sample.RabbitMQ.MySql/AppDbContext.cs b/samples/Sample.RabbitMQ.MySql/AppDbContext.cs index 9e9274c..60f4622 100644 --- a/samples/Sample.RabbitMQ.MySql/AppDbContext.cs +++ b/samples/Sample.RabbitMQ.MySql/AppDbContext.cs @@ -11,7 +11,7 @@ namespace Sample.RabbitMQ.MySql public class AppDbContext : DbContext { - public const string ConnectionString = "Server=192.168.10.110;Database=testcap;UserId=root;Password=123123;IgnoreCommandTransaction=true;"; + public const string ConnectionString = "Server=192.168.10.110;Database=testcap;UserId=root;Password=123123;"; public DbSet Persons { get; set; } diff --git a/samples/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs b/samples/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs index 9fa3b82..503fcdb 100644 --- a/samples/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs +++ b/samples/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs @@ -28,7 +28,6 @@ namespace Sample.RabbitMQ.MySql.Controllers [Route("~/adonet/transaction")] public IActionResult AdonetWithTransaction() { - //NOTE: Add `IgnoreCommandTransaction=true;` to your connection string, see https://github.com/mysql-net/MySqlConnector/issues/474 using (var connection = new MySqlConnection(AppDbContext.ConnectionString)) { using (var transaction = connection.BeginTransaction(_capBus, autoCommit: false))