You can get the latest stable release from the official Nuget.org feed or from our github releases page.
- .NET Standard 1.6 : .NET Core 1.0, .NET Framework 4.6.1, Mono 4.6...
- .NET Standard 2.0 : .NET Core 2.0, .NET Framework 4.6.1, Mono 5.4...
Download via Nuget on Package Manager Console
:
PM> Install-Package our.cms
using our.cms;
public void ConfigureServices(IServiceCollection services)
{
…
services.AddOurCMS();
…
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ...
{
…
app.UseOurCMS();
…
}
using our.cms;
[Root]
[ParentOf(typeof(Child))]
public class Root : CmsEntry
{
}
public class Child : CmsEntry
{
[Text]
public string Title { get; set; }
[HTML]
public string Content { get; set; }
}
using our.cms;
public class HomeController : Controller
{
protected readonly DB DB;
// inject the database provider using D.I.
public HomeController(IDBProvider dbprovider) {
// gets the database
DB = dbprovider.Default;
}
…
public IActionResult Index()
{
var child = DB.Find<Child>().FirstOrDefault();
ViewData["Title"] = child?.Title ?? "no child !";
ViewData["Content"] = child?.Content ?? "";
return View();
}
…
}