Files
Migu2.0/MiGu.Server/Persistence/PlatformPersistence.cs
T

25 lines
991 B
C#
Raw Normal View History

using MiGu.DB.Kernel.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace MiGu.Server.Persistence;
/// <summary>兼容入口:转调 MiGu.DB Hosting,并注册本进程业务服务。</summary>
public static class PlatformPersistence
{
public static IServiceCollection AddPlatformPersistence(this IServiceCollection services, IConfiguration configuration)
{
services.AddMiGuDb(configuration);
services.AddScoped<Wms.WmsReferenceValidator>();
services.AddScoped<Wms.WmsService>();
services.AddScoped<Wms.WmsTransportRuleService>();
services.AddScoped<Wms.WmsTransportPlanner>();
services.AddScoped<Wms.WmsTransportTaskService>();
services.AddScoped<Wms.IWmsDispatchAdapter, Wms.NoopWmsDispatchAdapter>();
services.AddScoped<SimpleFields.SimpleFieldService>();
services.AddScoped<Dashboard.DashboardShortcutService>();
return services;
}
}