using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; using WebApi.Data; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); // builder.Services.AddIdentityApiEndpoints(); // builder.Services.AddIdentity(); builder.Services.AddDbContext(options => options.UseSqlite()); builder.Services.AddDbContext(); builder.Services.AddAuthorization(); builder.Services.AddIdentityApiEndpoints().AddEntityFrameworkStores(); var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); } // app.UseHttpsRedirection(); app.MapIdentityApi(); app.UseAuthorization(); app.MapControllers(); app.Run();