LMS.service/LMS.service/Configuration/ServiceConfiguration.cs

50 lines
1.7 KiB
C#

using LMS.DAO.MachineDAO;
using LMS.DAO.PermissionDAO;
using LMS.DAO.RoleDAO;
using LMS.DAO.UserDAO;
using LMS.service.Configuration.InitConfiguration;
using LMS.service.Service;
using LMS.service.Service.PermissionService;
using LMS.service.Service.PromptService;
using LMS.service.Service.RoleService;
using LMS.service.Service.SoftwareService;
using LMS.service.Service.UserService;
namespace Lai_server.Configuration
{
public static class ServiceConfiguration
{
public static void AddServices(this IServiceCollection services)
{
// 注入Service
services.AddScoped<RsaConfigurattions>();
services.AddScoped<DatabaseConfiguration>();
// 注入DDL
services.AddScoped<LoginService>();
services.AddScoped<SecurityService>();
services.AddScoped<MachineService>();
services.AddScoped<PermissionService>();
services.AddScoped<PremissionValidationService>();
services.AddScoped<RoleService>();
services.AddScoped<UserService>();
services.AddScoped<OptionsService>();
services.AddScoped<PromptTypeService>();
services.AddScoped<PromptService>();
services.AddScoped<ForwardWordService>();
services.AddScoped<SoftwareControlService>();
services.AddScoped<SoftwareService>();
// 注入 DAO
services.AddScoped<UserBasicDao>();
services.AddScoped<RoleBasicDao>();
services.AddScoped<MachineBasicDao>();
services.AddScoped<PermissionBasicDao>();
services.AddScoped<PermissionTypeDao>();
}
}
}