2023-10-10 16:21:00 +02:00
|
|
|
|
using DataAccess.Data;
|
|
|
|
|
using DataAccess.DbAccess;
|
2023-10-11 14:41:43 +02:00
|
|
|
|
using KIKunstKirstenKl<EFBFBD>ckner.Data;
|
2023-08-02 21:33:09 +02:00
|
|
|
|
using Radzen;
|
2023-08-02 16:20:21 +02:00
|
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
|
|
// Add services to the container.
|
|
|
|
|
builder.Services.AddRazorPages();
|
|
|
|
|
builder.Services.AddServerSideBlazor();
|
2023-10-11 14:41:43 +02:00
|
|
|
|
|
2023-08-02 21:33:09 +02:00
|
|
|
|
builder.Services.AddScoped<TooltipService>();
|
|
|
|
|
builder.Services.AddScoped<DialogService>();
|
|
|
|
|
builder.Services.AddScoped<NotificationService>();
|
2023-10-11 14:41:43 +02:00
|
|
|
|
builder.Services.AddScoped<ImageGenerator>();
|
|
|
|
|
|
|
|
|
|
builder.Services.AddScoped<AiArtPageData>();
|
|
|
|
|
|
2023-10-10 16:21:00 +02:00
|
|
|
|
builder.Services.AddSingleton<ISqlDataAccess, SqlDataAccess>();
|
|
|
|
|
builder.Services.AddSingleton<BildInfoData>();
|
2023-10-10 18:18:17 +02:00
|
|
|
|
builder.Services.AddSingleton<WunschInfoData>();
|
2023-08-02 16:20:21 +02:00
|
|
|
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
|
|
|
|
|
|
// Configure the HTTP request pipeline.
|
|
|
|
|
if (!app.Environment.IsDevelopment())
|
|
|
|
|
{
|
|
|
|
|
app.UseExceptionHandler("/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.MapBlazorHub();
|
|
|
|
|
app.MapFallbackToPage("/_Host");
|
|
|
|
|
|
|
|
|
|
app.Run();
|