Initial commit: project structure, bez lokalnych secrets

This commit is contained in:
Michał Zieliński
2025-06-19 21:50:35 +02:00
commit 72197ff5fc
65 changed files with 1515 additions and 0 deletions

24
Bimix.API/Program.cs Normal file
View File

@@ -0,0 +1,24 @@
using Bimix.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
var builder = WebApplication.CreateBuilder(args);
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
builder.Services.AddDbContext<BimixDbContext>(options => options.UseSqlServer(connectionString));
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();