Browse Source

Fixes EF transaction missing SaveChanges

master
shaw 2 years ago
committed by GitHub
parent
commit
6724f02ef7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      samples/Sample.RabbitMQ.SqlServer/Controllers/ValuesController.cs

+ 1
- 1
samples/Sample.RabbitMQ.SqlServer/Controllers/ValuesController.cs View File

@@ -57,7 +57,7 @@ namespace Sample.RabbitMQ.SqlServer.Controllers
using (dbContext.Database.BeginTransaction(_capBus, autoCommit: true)) using (dbContext.Database.BeginTransaction(_capBus, autoCommit: true))
{ {
dbContext.Persons.Add(new Person() { Name = "ef.transaction" }); dbContext.Persons.Add(new Person() { Name = "ef.transaction" });
dbContext.SaveChanges();
_capBus.Publish("sample.rabbitmq.sqlserver", new Person() _capBus.Publish("sample.rabbitmq.sqlserver", new Person()
{ {
Id = 123, Id = 123,


Loading…
Cancel
Save