|
|
|
@ -4,6 +4,7 @@ using Expedience.Api.Encryption;
|
|
|
|
using MassTransit;
|
|
|
|
using MassTransit;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Expedience.Infrastructure.Concurrency;
|
|
|
|
using Expedience.Infrastructure.Concurrency;
|
|
|
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
|
|
|
|
@ -11,7 +12,12 @@ var connectionString = builder.Configuration.GetConnectionString("Expedience");
|
|
|
|
builder.Services.AddDbContext<ExpedienceContext>(options =>
|
|
|
|
builder.Services.AddDbContext<ExpedienceContext>(options =>
|
|
|
|
options.UseNpgsql(connectionString).UseLowerCaseNamingConvention());
|
|
|
|
options.UseNpgsql(connectionString).UseLowerCaseNamingConvention());
|
|
|
|
|
|
|
|
|
|
|
|
builder.Services.AddControllers();
|
|
|
|
builder.Services.AddControllers().AddJsonOptions(options =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.Preserve;
|
|
|
|
|
|
|
|
options.JsonSerializerOptions.WriteIndented = true; // Optional: for pretty printing
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
|
|
builder.Services.AddSwaggerGen();
|
|
|
|
builder.Services.AddSwaggerGen();
|
|
|
|
|