Skip to content

Instantly share code, notes, and snippets.

@sitefinitySDK
Created October 25, 2024 21:49
Show Gist options
  • Save sitefinitySDK/b41b13ade1627f1a8bd70a22428facd5 to your computer and use it in GitHub Desktop.
Save sitefinitySDK/b41b13ade1627f1a8bd70a22428facd5 to your computer and use it in GitHub Desktop.
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Progress.Sitefinity.AspNetCore;
using Progress.Sitefinity.AspNetCore.FormWidgets;
using Progress.Sitefinity.Renderer.Designers;
using all_properties.Extensibility;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddSitefinity();
builder.Services.AddViewComponentModels();
builder.Services.AddFormViewComponentModels();
builder.Services.AddSingleton<IPropertyConfigurator, ExternalChoicePropertyConfigurator>();
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
app.UseHsts();
}
app.UseStaticFiles();
app.UseRouting();
app.UseSitefinity();
app.Run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment