using FabWorks.Api.Configuration; using FabWorks.Api.Services; using FabWorks.Core.Data; using Microsoft.EntityFrameworkCore; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); builder.Services.AddDbContext(options => options.UseSqlServer(builder.Configuration.GetConnectionString("FabWorksDb"))); builder.Services.AddSingleton(); builder.Services.Configure( builder.Configuration.GetSection(FileStorageOptions.SectionName)); builder.Services.AddScoped(); var app = builder.Build(); app.UseDefaultFiles(); app.UseStaticFiles(new StaticFileOptions { OnPrepareResponse = ctx => ctx.Context.Response.Headers.Append("Cache-Control", "no-cache, no-store") }); app.MapControllers(); app.Run();