Nested models are not supported
ngoossens opened this issue · 2 comments
ngoossens commented
Fixed in the master
Trying to bind to nested models fails with a runtime error. See the below code example.
RazorMachine rm = new RazorMachine();
ITemplate template = rm.ExecuteContent(
@"Razor says: Hello @Model.User.FirstName @Model.User.LastName",
new {
User = new
{
FirstName = "John",
LastName = "Smith"
}
});
Console.WriteLine(template.Result);
Runtime binding error: Model type 'object' does not contain a definition for 'FirstName'
jlamfers commented
Fixed it in the master
ngoossens commented
Dank u wel. Super fast fix!