using zero; using zero.Api; using zero.Applications; using zero.Architecture; using zero.Backoffice; using zero.Backoffice.DevServer; using zero.Demo; using zero.Localization; using zero.Routing; using zero.Spaces; using zero.Stores; var builder = WebApplication.CreateBuilder(args); builder.Services.AddRazorPages(); builder.Services.AddTransient(); builder.Services .AddZero(builder.Configuration) .AddApi() .AddBackoffice(); builder.Services.Configure(opts => { opts.Enabled = false; }); builder.Services.Configure(opts => { opts.AddSpaceList("team", "Team", "Members of our team", "fth-users", "spaces.team"); opts.Configure(x => x.CanUseWithoutFlavors = false); opts.Add("eu_country", "EU country", "A country within the European Union", "fth-globe"); opts.Add("usa_country", "USA", "A country in the United States", "fth-flag"); }); builder.Services.Configure(opts => { opts.Add(); opts.Add(); }); var app = builder.Build(); // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error"); } app.UseZero().WithEndpoints(x => { //x.MapControllerRoute("default", "api/{controller}/{action=Index}/{id?}"); x.MapControllers(); x.MapRazorPages(); x.MapZeroApi(); x.MapZeroBackoffice(); x.MapZeroRoutes(); }); //app.UseZeroBackoffice(); app.Run(); public class EuropeanCountry : Country { public string EuName { get; set; } } public class AmericanCountry : Country { public string State { get; set; } }