2024-05-27 00:50:40 +04:00
|
|
|
using PlumbingRepairClientApp;
|
2024-05-29 20:33:49 +04:00
|
|
|
using UniversityBusinessLogic.OfficePackage;
|
|
|
|
using UniversityBusinessLogic.OfficePackage.Implements;
|
2024-05-27 00:50:40 +04:00
|
|
|
|
2024-04-29 19:06:11 +04:00
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
// Add services to the container.
|
|
|
|
builder.Services.AddControllersWithViews();
|
|
|
|
|
2024-05-29 20:33:49 +04:00
|
|
|
builder.Services.AddTransient<AbstractSaveToExcelWorker, SaveToExcelWorker>();
|
|
|
|
builder.Services.AddTransient<AbstractSaveToWordWorker, SaveToWordWorker>();
|
|
|
|
builder.Services.AddTransient<AbstractSaveToPdfWorker, SaveToPdfWorker>();
|
|
|
|
|
2024-04-29 19:06:11 +04:00
|
|
|
var app = builder.Build();
|
|
|
|
|
2024-05-27 00:50:40 +04:00
|
|
|
APIClient.Connect(builder.Configuration);
|
|
|
|
// Configure the HTTP request pipeline.
|
2024-04-29 19:06:11 +04:00
|
|
|
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",
|
|
|
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
|
|
|
|
|
|
|
app.Run();
|