Minimal ASP.NET Core entry point configuring OrchardCore CMS with NLog.
// Source: https://github.com/OrchardCMS/OrchardCore.Commerce | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using OrchardCore.Logging;
using System.Diagnostics.CodeAnalysis;
var builder = WebApplication.CreateBuilder(args);
builder.Logging.ClearProviders();
builder.Host.UseNLogHost();
var configuration = builder.Configuration;
builder.Services
.AddSingleton(configuration)
.AddOrchardCms(orchardCoreBuilder => orchardCoreBuilder
// Enabling allowInlineStyle is necessary because style attributes are used in the Blog theme. Re-evaluate if
// this is still true during the review of https://github.co
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key