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;
|
|
|
|
|
|
using PARR.DAL.Services.Interfaces;
|
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-16 15:00:11 +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>();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|