using Blazorise; using Blazorise.Bootstrap; using Blazorise.Icons.FontAwesome; using BuchhaltungBlazor.Data; // using Microsoft.EntityFrameworkCore; WebApplicationBuilder builder = WebApplication.CreateBuilder(args); // Add services to the container. // string connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found."); // builder.Services.AddDbContext(options => options.UseSqlite(connectionString)); // builder.Services.AddDatabaseDeveloperPageExceptionFilter(); // builder.Services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true).AddEntityFrameworkStores(); builder.Services.AddRazorPages(); builder.Services.AddServerSideBlazor(); // builder.Services.AddScoped>(); // builder.Services.AddSingleton(); builder.Services.AddScoped(); builder.Services.AddBlazorise(options => { options.Immediate = true; }).AddBootstrapProviders().AddBootstrapComponents().AddFontAwesomeIcons(); // .AddMaterialProviders().AddMaterialIcons(); builder.Services.AddOptions(); builder.WebHost.UseWebRoot("wwwroot"); builder.WebHost.UseStaticWebAssets(); WebApplication app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseMigrationsEndPoint(); } else { 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.UseAuthorization(); app.MapControllers(); app.MapBlazorHub(); app.MapFallbackToPage("/_Host"); app.Run();