2023-05-17 16:30:13 +10:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
using PARR.DAL.Context;
|
2023-06-01 12:30:38 +10:00
|
|
|
|
using PARR.DAL.Services.Implementations;
|
2023-08-11 09:21:54 +10:00
|
|
|
|
using PARR.DAL.Services.Implementations.AIHIT;
|
2023-06-01 12:30:38 +10:00
|
|
|
|
using PARR.DAL.Services.Interfaces;
|
2023-08-11 09:21:54 +10:00
|
|
|
|
using PARR.DAL.Services.Interfaces.AIHIT;
|
2023-05-17 16:30:13 +10:00
|
|
|
|
|
|
|
|
|
|
namespace PARR.DAL
|
|
|
|
|
|
{
|
|
|
|
|
|
public static class ParrDalInstaller
|
|
|
|
|
|
{
|
|
|
|
|
|
public static void InstallDalServices(this IServiceCollection services, IConfiguration configuration)
|
|
|
|
|
|
{
|
|
|
|
|
|
services.AddDbContext<DataContext>(opt =>
|
|
|
|
|
|
opt.UseNpgsql(configuration.GetConnectionString("DefaultConnection"))
|
|
|
|
|
|
);
|
|
|
|
|
|
|
2023-06-01 12:30:38 +10:00
|
|
|
|
services.AddTransient<IHostService, HostService>();
|
2023-06-13 15:04:47 +10:00
|
|
|
|
services.AddTransient<IApplicationService, ApplicationService>();
|
|
|
|
|
|
services.AddTransient<IApplicationTypeService, ApplicationTypeService>();
|
|
|
|
|
|
services.AddTransient<IApplicationInHostService, ApplicationInHostService>();
|
2023-06-20 12:29:58 +10:00
|
|
|
|
services.AddTransient<IJobService, JobService>();
|
2023-06-20 16:54:38 +10:00
|
|
|
|
services.AddTransient<IJobJournalService, JobJournalService>();
|
2023-08-11 09:21:54 +10:00
|
|
|
|
services.AddTransient<IRawDataEKService, RawDataEKService>();
|
2023-08-14 11:38:59 +10:00
|
|
|
|
services.AddTransient<ISettingService, SettingService>();
|
2023-06-20 12:29:58 +10:00
|
|
|
|
//services.AddTransient<ISchedulerService, SchedulerService>();
|
2023-06-13 15:04:47 +10:00
|
|
|
|
|
2023-05-17 16:30:13 +10:00
|
|
|
|
//services.AddTransient<IAreasInLayerService, AreasInLayerService>();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|