From 797b1f71ba44108479975e3e4da0ad5c59aedf17 Mon Sep 17 00:00:00 2001 From: Savorboard Date: Mon, 20 Aug 2018 18:55:02 +0800 Subject: [PATCH] update samples --- .../Sample.RabbitMQ.MongoDB/Controllers/ValuesController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/Sample.RabbitMQ.MongoDB/Controllers/ValuesController.cs b/samples/Sample.RabbitMQ.MongoDB/Controllers/ValuesController.cs index 3eed63c..07b377f 100644 --- a/samples/Sample.RabbitMQ.MongoDB/Controllers/ValuesController.cs +++ b/samples/Sample.RabbitMQ.MongoDB/Controllers/ValuesController.cs @@ -26,7 +26,7 @@ namespace Sample.RabbitMQ.MongoDB.Controllers //mycollection.InsertOne(new BsonDocument { { "test", "test" } }); using (var session = _client.StartSession()) - using (var trans = _capPublisher.CapTransaction.Begin(session)) + using (var trans = _capPublisher.Transaction.Begin(session)) { var collection = _client.GetDatabase("test").GetCollection("test.collection"); collection.InsertOne(session, new BsonDocument { { "hello", "world" } }); @@ -42,7 +42,7 @@ namespace Sample.RabbitMQ.MongoDB.Controllers public IActionResult PublishNotAutoCommit() { using (var session = _client.StartSession()) - using (_capPublisher.CapTransaction.Begin(session, true)) + using (_capPublisher.Transaction.Begin(session, true)) { var collection = _client.GetDatabase("test").GetCollection("test.collection"); collection.InsertOne(session, new BsonDocument { { "hello2", "world2" } });