# Razor Template Transform

### RazorTemplateTransform <a href="#razortemplatetransform" id="razortemplatetransform"></a>

Razor is a template markup syntax based on the C# programming language.

The **RazorTemplateTransform** function allows for creating HTML from templates.

***

### Properties <a href="#properties" id="properties"></a>

#### Encoding <a href="#encoding" id="encoding"></a>

Describes what to do with text written to the template from the model.

* **Raw**

  Output the text as-is.
* **Html**

  Encode the text to html.

#### Model <a href="#model" id="model"></a>

Contains the data that will be used to populate the Template.

You can, for example, enter a *Type* like *String*, or an *ExecuteSQL*.

#### Template <a href="#template" id="template"></a>

A text template that will be populated by the data in the Model property.

Use `@Model` to access the properties of the structured object referenced in this property, for example:

`@Model.FirstName`

If you point the Model property at a list, you can loop through the list items like this:

`@foreach(var item in Model) { @:@item.FirstName,@item.LastName }`

***

### Links <a href="#links" id="links"></a>

[Wikipedia Razor](https://en.wikipedia.org/wiki/ASP.NET_Razor)

[Razor syntax quick reference](http://haacked.com/archive/2011/01/06/razor-syntax-quick-reference.aspx)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linx.software/reference/plugins/text/content/razortemplatetransform.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
