Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

Code Block
languagec#
@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.