2024-05-30 12:13:54 +04:00
|
|
|
using LawFirmContracts.BusinessLogicContracts;
|
2024-05-01 20:47:42 +04:00
|
|
|
using LawFirmContracts.StoragesContracts;
|
|
|
|
using LawFirmDatabaseImplement.Implements;
|
|
|
|
using LawFirmGuarantorApp;
|
2024-05-30 12:13:54 +04:00
|
|
|
using LawFirmBusinessLogic.BusinessLogics;
|
|
|
|
using LawFirmBusinessLogic.OfficePackages;
|
|
|
|
using LawFirmBusinessLogic.MailWorker;
|
|
|
|
using LawFirmBusinessLogic.OfficePackages.Implements;
|
2024-05-01 20:47:42 +04:00
|
|
|
|
2024-04-29 11:43:36 +04:00
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
2024-05-29 17:17:36 +04:00
|
|
|
//builder.Services.AddTransient<IConsultationStorage, ConsultationStorage>();
|
|
|
|
//builder.Services.AddTransient<IHearingStorage, HearingStorage>();
|
2024-05-30 12:13:54 +04:00
|
|
|
builder.Services.AddTransient<IReportLogic, ReportLogic>();
|
|
|
|
builder.Services.AddTransient<IClientStorage, ClientStorage>();
|
|
|
|
builder.Services.AddTransient<IHearingStorage, HearingStorage>();
|
|
|
|
builder.Services.AddTransient<IVisitStorage, VisitStorage>();
|
|
|
|
builder.Services.AddTransient<ICaseStorage, CaseStorage>();
|
|
|
|
builder.Services.AddTransient<IConsultationStorage, ConsultationStorage>();
|
|
|
|
builder.Services.AddTransient<ILawyerStorage, LawyerStorage>();
|
|
|
|
|
|
|
|
builder.Services.AddTransient<IExecutorLogic, ExecutorLogic>();
|
|
|
|
builder.Services.AddTransient<IGuarantorLogic, GuarantorLogic>();
|
|
|
|
builder.Services.AddTransient<IExecutorStorage, ExecutorStorage>();
|
|
|
|
builder.Services.AddTransient<IGuarantorStorage, GuarantorStorage>();
|
|
|
|
|
|
|
|
builder.Services.AddTransient<AbstractSaveToExcelClientsConsultation, SaveToExcelClientsConsultation>();
|
|
|
|
builder.Services.AddTransient<AbstractSaveToExcelVisitsLawyer, SaveToExcelVisitsLawyer>();
|
|
|
|
builder.Services.AddTransient<AbstractSaveToWordClientsConsultation, SaveToWordClientsConsultation>();
|
|
|
|
builder.Services.AddTransient<AbstractSaveToWordVisitsLawyer, SaveToWordVisitsLawyer>();
|
|
|
|
builder.Services.AddTransient<AbstractSaveToPdfConsultationHearing, SaveToPdfConsultationHearing>();
|
|
|
|
builder.Services.AddTransient<AbstractSaveToPdfCaseHearing, SaveToPdfCaseHearing>();
|
|
|
|
builder.Services.AddTransient<AbstractSaveToPdfClients, SaveToPdfClients>();
|
|
|
|
builder.Services.AddTransient<AbstractSaveToPdfClientCaseHearing, SaveToPdfClientCaseHearing>();
|
|
|
|
builder.Services.AddSingleton<AbstractMailWorker, MailKitWorker>();
|
|
|
|
|
2024-04-29 11:43:36 +04:00
|
|
|
|
|
|
|
// Add services to the container.
|
|
|
|
builder.Services.AddControllersWithViews();
|
|
|
|
|
|
|
|
var app = builder.Build();
|
2024-04-30 00:27:07 +04:00
|
|
|
APIClient.Connect(builder.Configuration);
|
2024-04-29 11:43:36 +04:00
|
|
|
|
|
|
|
// Configure the HTTP request pipeline.
|
|
|
|
if (!app.Environment.IsDevelopment())
|
|
|
|
{
|
|
|
|
app.UseExceptionHandler("/Home/Error");
|
|
|
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
|
|
|
app.UseHsts();
|
|
|
|
}
|
|
|
|
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
app.UseStaticFiles();
|
|
|
|
|
|
|
|
app.UseRouting();
|
|
|
|
|
|
|
|
app.UseAuthorization();
|
|
|
|
|
|
|
|
app.MapControllerRoute(
|
|
|
|
name: "default",
|
2024-05-29 17:17:36 +04:00
|
|
|
pattern: "{controller=Home}/{action=EnterGuarantor}/{id?}");
|
2024-04-29 11:43:36 +04:00
|
|
|
|
|
|
|
app.Run();
|