Savorboard пре 6 година
родитељ
комит
45bd5ed2d1
3 измењених фајлова са 1 додато и 4 уклоњено
  1. +0
    -2
      samples/Sample.Kafka.MySql/Controllers/ValuesController.cs
  2. +1
    -1
      samples/Sample.RabbitMQ.MySql/AppDbContext.cs
  3. +0
    -1
      samples/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs

+ 0
- 2
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))


+ 1
- 1
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<Person> Persons { get; set; }



+ 0
- 1
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))


Loading…
Откажи
Сачувај