The smallest setup
Six lines in Program.cs make a working CMS host:
var builder = WebApplication.CreateBuilder(args);
builder.AddRelatudeCMS().AddMvcRendering();
var app = builder.Build();
app.UseRelatudeCMS();
app.MapRelatudeCMS();
app.Run();| Call | What it does |
|---|---|
AddRelatudeCMS() |
adds Relatude.DB, the CMS settings, analytics and content routing, which turns a URL into a page or a stored file |
.AddMvcRendering() |
renders pages with MVC views and controllers; .AddRazorPagesRendering() adds Razor Pages |
UseRelatudeCMS() |
starts the database and its admin UI, and adds the analytics middleware |
MapRelatudeCMS() |
answers every URL the database knows: it renders the page or sends the file |
The calls are in the global namespace, so they need no using.