Phase 2: Backend API Implementation - DTOs, Services, and Controllers
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user