From ff56b4d16021e0dbeca31f3e59399b543dc194fa Mon Sep 17 00:00:00 2001 From: zhenlei520 Date: Tue, 10 May 2022 14:22:51 +0800 Subject: [PATCH 1/3] docs(EventBus): Modify EventBus documentation --- src/Ddd/Masa.Contrib.Ddd.Domain/README.md | 7 +++---- src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md | 7 +++---- .../README.md | 1 - .../README.zh-CN.md | 1 - 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/Ddd/Masa.Contrib.Ddd.Domain/README.md b/src/Ddd/Masa.Contrib.Ddd.Domain/README.md index b555a3839..09fc39440 100644 --- a/src/Ddd/Masa.Contrib.Ddd.Domain/README.md +++ b/src/Ddd/Masa.Contrib.Ddd.Domain/README.md @@ -22,11 +22,10 @@ Install-Package Masa.Utils.Data.EntityFrameworkCore.SqlServer builder.Services .AddDomainEventBus(options => { - // options.UseEventBus(eventBusBuilder => eventBusBuilder.UseMiddleware(typeof(ValidatorMiddleware<>)))//Use in-process events and use middleware - options.UseEventBus()//Use in-process events + options.UseDaprEventBus(options => options.UseEventLog())//Use cross-process events + // .UseEventBus(eventBuilder => eventBuilder.UseMiddleware(typeof(ValidatorMiddleware<>))) // Use in-process events and use middleware + .UseEventBus() // Use in-process events .UseUoW(dbOptions => dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=idientity")) - .UseDaprEventBus()///Use cross-process events - .UseEventLog() .UseRepository();//Use the EF version of Repository to achieve }) ``` diff --git a/src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md b/src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md index e22ba2d9b..5b79bf8de 100644 --- a/src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md +++ b/src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md @@ -22,11 +22,10 @@ Install-Package Masa.Utils.Data.EntityFrameworkCore.SqlServer builder.Services .AddDomainEventBus(options => { - // options.UseEventBus(eventBusBuilder => eventBusBuilder.UseMiddleware(typeof(ValidatorMiddleware<>)))//使用进程内事件并使用中间件 - options.UseEventBus()//使用进程内事件 + options.UseDaprEventBus(options => options.UseEventLog())//使用跨进程事件 + // .UseEventBus(eventBuilder => eventBuilder.UseMiddleware(typeof(ValidatorMiddleware<>))) // 使用进程内事件并使用中间件 + .UseEventBus()//使用进程内事件 .UseUoW(dbOptions => dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=idientity")) - .UseDaprEventBus()///使用跨进程事件 - .UseEventLog() .UseRepository();//使用Repository的EF版实现 }) ``` diff --git a/src/Dispatcher/Masa.Contrib.Dispatcher.IntegrationEvents.Dapr/README.md b/src/Dispatcher/Masa.Contrib.Dispatcher.IntegrationEvents.Dapr/README.md index dc993b783..fc4304ab9 100644 --- a/src/Dispatcher/Masa.Contrib.Dispatcher.IntegrationEvents.Dapr/README.md +++ b/src/Dispatcher/Masa.Contrib.Dispatcher.IntegrationEvents.Dapr/README.md @@ -19,7 +19,6 @@ builder.Services { options.UseUoW(dbOptions => dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity")) .UseEventLog(); - ) }); ``` diff --git a/src/Dispatcher/Masa.Contrib.Dispatcher.IntegrationEvents.Dapr/README.zh-CN.md b/src/Dispatcher/Masa.Contrib.Dispatcher.IntegrationEvents.Dapr/README.zh-CN.md index 61be26831..55a893606 100644 --- a/src/Dispatcher/Masa.Contrib.Dispatcher.IntegrationEvents.Dapr/README.zh-CN.md +++ b/src/Dispatcher/Masa.Contrib.Dispatcher.IntegrationEvents.Dapr/README.zh-CN.md @@ -19,7 +19,6 @@ builder.Services { options.UseUoW(dbOptions => dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity"))//使用工作单元,推荐使用 .UseEventLog(); - ) }); ``` From bf1492a30d537575e1e1c0309fe8878f26712d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=AC=E9=9B=A8=E5=A3=B0?= Date: Tue, 10 May 2022 16:42:30 +0800 Subject: [PATCH 2/3] Update README.md --- src/Ddd/Masa.Contrib.Ddd.Domain/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Ddd/Masa.Contrib.Ddd.Domain/README.md b/src/Ddd/Masa.Contrib.Ddd.Domain/README.md index 09fc39440..6d92b074c 100644 --- a/src/Ddd/Masa.Contrib.Ddd.Domain/README.md +++ b/src/Ddd/Masa.Contrib.Ddd.Domain/README.md @@ -22,11 +22,11 @@ Install-Package Masa.Utils.Data.EntityFrameworkCore.SqlServer builder.Services .AddDomainEventBus(options => { - options.UseDaprEventBus(options => options.UseEventLog())//Use cross-process events + options.UseDaprEventBus(options => options.UseEventLog())//Use cross-process events // .UseEventBus(eventBuilder => eventBuilder.UseMiddleware(typeof(ValidatorMiddleware<>))) // Use in-process events and use middleware .UseEventBus() // Use in-process events - .UseUoW(dbOptions => dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=idientity")) - .UseRepository();//Use the EF version of Repository to achieve + .UseUoW(dbOptions => dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=idientity")) + .UseRepository();//Use the EF version of Repository to achieve }) ``` @@ -117,4 +117,4 @@ public async Task RegisterUserSucceededHandlerAsync(RegisterUserSucceededIntegra { //todo } -``` \ No newline at end of file +``` From bfb7e8f38b77b6fd6d9110eda7ff000b1797b33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=AC=E9=9B=A8=E5=A3=B0?= Date: Tue, 10 May 2022 16:42:55 +0800 Subject: [PATCH 3/3] Update README.zh-CN.md --- src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md b/src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md index 5b79bf8de..fd5d521d3 100644 --- a/src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md +++ b/src/Ddd/Masa.Contrib.Ddd.Domain/README.zh-CN.md @@ -22,11 +22,11 @@ Install-Package Masa.Utils.Data.EntityFrameworkCore.SqlServer builder.Services .AddDomainEventBus(options => { - options.UseDaprEventBus(options => options.UseEventLog())//使用跨进程事件 + options.UseDaprEventBus(options => options.UseEventLog())//使用跨进程事件 // .UseEventBus(eventBuilder => eventBuilder.UseMiddleware(typeof(ValidatorMiddleware<>))) // 使用进程内事件并使用中间件 .UseEventBus()//使用进程内事件 - .UseUoW(dbOptions => dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=idientity")) - .UseRepository();//使用Repository的EF版实现 + .UseUoW(dbOptions => dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=idientity")) + .UseRepository();//使用Repository的EF版实现 }) ```