This commit is contained in:
2025-05-25 18:37:27 +02:00
parent 90d7281050
commit 01310020ce
10 changed files with 337 additions and 0 deletions

41
API/Api.cs Normal file
View File

@ -0,0 +1,41 @@
using SQLiteEF;
namespace API;
public class Api
{
public Api(string[] args)
{
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();
builder.Services.AddDbContext<Context>();
WebApplication app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
}
public static void Main(string[] args)
{
Api _ = new (args);
}
}