Przeglądaj źródła

update samples

master
Savorboard 6 lat temu
rodzic
commit
45bd5ed2d1
3 zmienionych plików z 1 dodań i 4 usunięć
  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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz