Files
lux/TestDevExpress/Program.cs
T
2026-04-01 11:26:51 +02:00

41 lines
1.0 KiB
C#

using DevExpress.Blazor.Reporting;
using DevExpress.XtraReports.Web.Extensions;
using TestDevExpress.Components;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
//// aggiungo servizio x chiamate http REST
//builder.Services.AddHttpClient();
//builder.Services.AddDevExpressBlazor();
builder.Services.AddDevExpressServerSideBlazorReportViewer();
builder.Services.AddMvc();
builder.Services.AddDevExpressBlazorReporting();
builder.WebHost.UseWebRoot("wwwroot");
builder.WebHost.UseStaticWebAssets();
builder.Services.AddScoped<ReportStorageWebExtension, CustomReportStorageWebExtension>();
var app = builder.Build();
app.UseDevExpressBlazorReporting();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
}
app.UseStaticFiles();
app.UseAntiforgery();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
app.Run();