Include the Output of a Content Route
Lynicon includes an equivalent of the MVC @Html.Action() method which gets the output of an action method and inserts it in the page. Â The available overloads are as follows:
@Html.ContentAction(string action, string controller) @Html.ContentAction(string action, string controller, object rvs) @Html.ContentAction(string action, string controller, RouteValueDictionary rvs)
This method avoids accessing the database twice (or more), once in testing for the existence of the content record in the process of finding the appropriate route, and again when calling the route to send it the content item.