Antaris/RazorEngine — Issue #33: @Include includes the wrong model.
Author: vLX42
Created: 2012-03-06 08:45:47+00:00
State: open

In version 2.0 I had no trouble making a template that included other templates but in version 3.0 the Model from the Parse function is passed down to all the templates i have run.

```javascript
Razor.Compile("NameB: @Model.Name", (new { }).GetType(), "TemplateB");
Razor.Run("TemplateB", new { Name = "testB" });

Razor.Compile("NameA: @Model.Name\r@Include(\"TemplateB\")", (new { }).GetType(), "TemplateA");
Razor.Run("TemplateA", new { Name = "testA" });

return Razor.Parse("Name: @Model.Name\r@Include(\"TemplateA\")", new { Name = "testRoot" });
```

Output: Name: testRoot NameA: testRoot NameB: testRoot

Expected output: Name: testRoot NameA: testA NameB: testB