using Microsoft.EntityFrameworkCore; using turf_tasker.Data; using Microsoft.AspNetCore.Identity; var builder = WebApplication.CreateBuilder(args); builder.Services.AddDbContext(options => options.UseSqlite( builder.Configuration.GetConnectionString("DefaultConnection") ) ); builder.Services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true) .AddEntityFrameworkStores(); builder.Services.AddControllersWithViews(); var app = builder.Build(); if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Home/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}" ); app.MapRazorPages(); app.Run();