Files
f9-web-ai-test/backend/F9WebAiTest.Application/DependencyInjection.cs
T
2026-10-08 10:43:59 +08:00

34 lines
1.4 KiB
C#

using F9WebAiTest.Application.Services;
using F9WebAiTest.Application.Services.Attendance;
using F9WebAiTest.Application.Services.Auth;
using F9WebAiTest.Application.Services.Base;
using F9WebAiTest.Application.Services.Notice;
using F9WebAiTest.Application.Services.Prod;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
namespace F9WebAiTest.Application;
public static class DependencyInjection
{
public static IServiceCollection AddApplication(this IServiceCollection services)
{
services.AddScoped<IJwtService, JwtService>();
services.AddScoped<IAuthService, AuthService>();
services.AddScoped<IAttendanceService, AttendanceService>();
services.AddScoped<ICraftZhuangKouService, CraftZhuangKouService>();
services.AddScoped<IShengsiGuigeService, ShengsiGuigeService>();
services.AddScoped<IShengsiDingjizhibiaoService, ShengsiDingjizhibiaoService>();
services.AddScoped<IJizuChetaiService, JizuChetaiService>();
services.AddScoped<ILsjlService, LsjlService>();
services.AddScoped<IXdjyService, XdjyService>();
services.AddScoped<IHbjyService, HbjyService>();
services.AddScoped<INotificationService, NotificationService>();
// MediatR:注册命令/查询 Handler
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(NotificationService).Assembly));
return services;
}
}