RazorHelper.Run Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Run(string, string, object, object)

Runs a Razor template using the specified layout, template and model.

public static string Run(string layout, string template, object model, object viewbag = null)

Parameters

layout
string

A Razor layout string, or null of no layout should ne used.

template
string

A Razor template string

model
object

The model object.

viewbag
object

An object with additional data for the view.

Returns

string

Returns the result of executing the specified razor template.