|
|
|
@ -4,7 +4,6 @@ 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);
|
|
|
|
|
|
|
|
|
|
|
|
@ -12,12 +11,7 @@ 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().AddJsonOptions(options =>
|
|
|
|
builder.Services.AddControllers();
|
|
|
|
{
|
|
|
|
|
|
|
|
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();
|
|
|
|
|