using Ds.Module.AppStartup; using DS.Module.SqlSugar; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace Ds.WMS.Finance.MediatR { [DsStartup(10)] public class MediatRAppStartup : IDynamicStartup { public void Configure(WebApplication app) { } public void ConfigureServices(WebApplicationBuilder builder) { builder.Services.AddSqlsugarInstall(); var assembly = AppDomain.CurrentDomain.Load("Ds.WMS.Finance.MediatR"); builder.Services.AddMediatR(c => { c.RegisterServicesFromAssembly(assembly); }); } } }