Files
Backend-Api/WorkFlow/Infrastructure/WorkFlow.Infrastructure.Config/WorkFlowBootstrapper.cs
2025-03-09 21:52:06 +03:30

48 lines
2.0 KiB
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using WorkFlow.Application;
using WorkFlow.Application.Contracts.AdminWorkFlow;
using WorkFlow.Application.Contracts.WorkFlow;
using WorkFlow.Domain.RollCallConfirmedAbsenceAgg;
using WorkFlow.Domain.RollCallConfirmedWithoutLunchBreakAgg;
using WorkFlow.Infrastructure.ACL.Checkout;
using WorkFlow.Infrastructure.ACL.CustomizedWorkshopSettings;
using WorkFlow.Infrastructure.ACL.Employee;
using WorkFlow.Infrastructure.ACL.EmployeeDocuments;
using WorkFlow.Infrastructure.ACL.RollCall;
using WorkFlow.Infrastructure.ACL.Workshop;
using WorkFlow.Infrastructure.EfCore;
using WorkFlow.Infrastructure.EfCore.Repository;
namespace WorkFlow.Infrastructure.Config
{
public class WorkFlowBootstrapper
{
public static void Configure(IServiceCollection services, string connectionString)
{
services.AddTransient<IWorkFlowApplication, WorkFlowApplication>();
services.AddTransient<IAdminWorkFlowApplication, AdminWorkFlowApplication>();
services.AddTransient<IRollCallConfirmedAbsenceRepository, RollCallConfirmedAbsenceRepository>();
services.AddTransient<IRollCallConfirmedWithoutLunchBreakRepository, RollCallConfirmedWithoutLunchBreakRepository>();
services.AddTransient<IWorkFlowCheckoutACL, WorkFlowCheckoutACL>();
services.AddTransient<IWorkFlowEmployeeDocumentsACL, WorkFlowEmployeeDocumentsACL>();
services.AddTransient<IWorkFlowRollCallACL, WorkFlowRollCallACL>();
services.AddTransient<IWorkFlowCustomizedWorkshopSettingsACL, WorkFlowCustomizedWorkshopSettingsACL>();
services.AddTransient<IWorkFlowEmployeeACL, WorkFlowEmployeeACL>();
services.AddTransient<IWorkFlowWorkshopACL, WorkFlowWorkshopACL>();
services.AddDbContext<WorkFlowContext>(x =>
{
x.UseSqlServer(connectionString);
});
}
}
}