Phase 2: Backend API Implementation - DTOs, Services, and Controllers

This commit is contained in:
steinhelge
2025-11-23 15:55:03 +01:00
parent 0661bebd87
commit 9ed5adbfb5
22 changed files with 1066 additions and 33 deletions
+9
View File
@@ -1,3 +1,4 @@
using Hospitality.Backend.Services;
using Hospitality.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
@@ -11,6 +12,14 @@ builder.Services.AddSwaggerGen();
builder.Services.AddDbContext<HospitalityDbContext>(options =>
options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
// Register services
builder.Services.AddScoped<IEventService, EventService>();
builder.Services.AddScoped<IGroupService, GroupService>();
builder.Services.AddScoped<IProductService, ProductService>();
builder.Services.AddScoped<IQrCodeService, QrCodeService>();
builder.Services.AddScoped<ITransactionService, TransactionService>();
var app = builder.Build();
// Configure the HTTP request pipeline.