Download

Developer Center

Saber.Core Functionality

If you are developing a plugin for Saber, please take the time to read and understand all of the documentation on this page. Saber.Core is a namespace within the Saber.Core NuGet package that allows developers to access various features within Saber when building a vendor plugin.


App

The static App class contains information about Saber's environment.


IRequest

The IRequest interface contains information about the current request and is inherited by both the Controller and Service classes. These classes inherit the Request class, which is part of the Datasilk Core MVC framework.


Controller

The Controller class inherits the Request class and is used to handle page requests. URLs within Saber will route to controllers based on the controller class name. For example, the URL http://localhost:7000/dashboard/users routes to the Dashboard controller class.


Service

The Service class inherits the Request class and is used for web API calls. URLs within Saber will route to services based on the URL beginning with /api/, the service class name, and the service method name. For example, the URL http://localhost:7000/api/dashboard/users routes to the Users method within the Dashboard service class.


User

The User class contains information about the authenticated user and is accessible from both the Controller and Service class.


View

The View class is used to render HTML views and is mainly used within Controller and Service classes. HTML views can contain mustache variables, blocks, and includes that are replaced with dynamic content when the view is rendered.

NOTE: All mustache variables must be lowercase no matter if they bind to C# fields that have uppercase letters.


Email

The static Email class is used to compose and send emails to users within Saber.


Log

The static Log class is used to log errors and other messages in Saber's database, which can be accessed and used as a way for debugging your plugin and is especially useful in a production environment.