KI-Kunst-Kirsten-Kloeckner/KIKunstKirstenKlöckner/Program.cs

37 lines
963 B
C#
Raw Normal View History

2023-10-10 16:21:00 +02:00
using DataAccess.Data;
using DataAccess.DbAccess;
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-08-02 21:33:09 +02:00
builder.Services.AddScoped<TooltipService>();
builder.Services.AddScoped<DialogService>();
builder.Services.AddScoped<NotificationService>();
2023-10-10 16:21:00 +02:00
builder.Services.AddSingleton<ISqlDataAccess, SqlDataAccess>();
builder.Services.AddSingleton<BildInfoData>();
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();