Update repository, seed and service layers

This commit is contained in:
Aaron Po
2026-01-15 14:48:18 -05:00
parent b8cd855916
commit c5aaf8cd05
15 changed files with 322 additions and 412 deletions

View File

@@ -1,6 +1,7 @@
using BusinessLayer.Services;
using DataAccessLayer;
using DataAccessLayer.Repositories;
using DataAccessLayer.Sql;
using WebAPI.Infrastructure;
var builder = WebApplication.CreateBuilder(args);
@@ -8,9 +9,11 @@ builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddOpenApi();
// Dependency Injection
builder.Services.AddSingleton<ISqlConnectionFactory, DefaultSqlConnectionFactory>();
builder.Services.AddScoped<IUserAccountRepository, UserAccountRepository>();
builder.Services.AddScoped<IUserService, UserService>();
var app = builder.Build();
if (app.Environment.IsDevelopment())