Add services and update project configuration

Added `AddRecServices` and `AddInfrastructureServices` to `Program.cs` with necessary configurations. Updated `ReC.API.csproj` to include project references to `ReC.Application` and `ReC.Infrastructure`, and fixed an encoding issue by adding a BOM. Modified `appsettings.json` to include `MediatRLicense` and adjusted `AllowedHosts` format. Ensured `TargetFramework` and other project properties remain unchanged.
This commit is contained in:
2025-11-25 16:52:21 +01:00
parent d62175f6ec
commit 89879d0821
3 changed files with 11 additions and 3 deletions

View File

@@ -1,9 +1,15 @@
using Microsoft.EntityFrameworkCore;
using ReC.Infrastructure;
using ReC.Application;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRecServices(options =>
{
options.LuckyPennySoftwareLicenseKey = builder.Configuration["LuckyPennySoftwareLicenseKey"];
});
builder.Services.AddInfrastructureServices(options =>
{
options.ConfigureDbContext((dbContextOpt) =>