diff --git a/samples/Sample.RabbitMQ.MySql/AppDbContext.cs b/samples/Sample.RabbitMQ.MySql/AppDbContext.cs index 60f4622..ce3535d 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;"; + public const string ConnectionString = "Server=localhost;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 503fcdb..a9c2c96 100644 --- a/samples/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs +++ b/samples/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs @@ -1,5 +1,6 @@ using System; using System.Data; +using System.Threading.Tasks; using Dapper; using DotNetCore.CAP; using Microsoft.AspNetCore.Mvc; @@ -18,9 +19,9 @@ namespace Sample.RabbitMQ.MySql.Controllers } [Route("~/without/transaction")] - public IActionResult WithoutTransaction() + public async Task WithoutTransaction() { - _capBus.Publish("sample.rabbitmq.mysql", DateTime.Now); + await _capBus.PublishAsync("sample.rabbitmq.mysql", DateTime.Now); return Ok(); }