
using VentaUniformes.Application;
using VentaUniformes.Common;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();
    /*    .AddJsonOptions(options =>
        {
            options.JsonSerializerOptions.PropertyNamingPolicy = null; // Si deseas mantener los nombres de las propiedades
        });*/
//builder.Services.AddControllers();
builder.Services.AddAplication();
builder.Services.AddCommon(builder.Configuration);
//.AddExternal(builder.Configuration)
//.AddPersistencia(builder.Configuration);
var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Home/Error");
}
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapControllerRoute(
    name: "default",
    pattern: "{controller=Sesion}/{action=Login}/{id?}");

//app.MapRazorPages();
app.Run();
