|
@@ -5,6 +5,7 @@ using MediatR.NotificationPublishers;
|
|
|
using Serilog;
|
|
|
using Sharing.Application;
|
|
|
using Sharing.Province;
|
|
|
+using Sharing.Province.Handlers.HuiJu;
|
|
|
using Sharing.Repository.Extensions;
|
|
|
using XF.Domain.Dependency;
|
|
|
using XF.Domain.Filters;
|
|
@@ -63,15 +64,17 @@ internal static class StartupExtensions
|
|
|
services.RegisterMapper();
|
|
|
|
|
|
//mediatr
|
|
|
- services.AddMediatR(cfg => {
|
|
|
- cfg.RegisterServicesFromAssemblyContaining<Program>();
|
|
|
+ services.AddMediatR(cfg =>
|
|
|
+ {
|
|
|
+ cfg.RegisterServicesFromAssembly(typeof(StartupExtensions).Assembly);
|
|
|
cfg.NotificationPublisher = new TaskWhenAllPublisher(); // this will be singleton
|
|
|
cfg.NotificationPublisherType = typeof(TaskWhenAllPublisher); // this will be the ServiceLifetime
|
|
|
+ cfg.RegisterProvinceServices();
|
|
|
});
|
|
|
|
|
|
//sqlsugar
|
|
|
services.AddSqlSugar(configuration, "Sharing");
|
|
|
-
|
|
|
+
|
|
|
//cache
|
|
|
services.AddCache(d =>
|
|
|
{
|