Antaris/RazorEngine — Issue #17: Templete for model as Object
Author: Zetanova
Created: 2012-01-27 16:42:02+00:00
State: open

Hallo.

All Methods with the Parameter "object model" dont work and
the Generic Paramter "T model"w where T is object dont work
either.

My only current workaroung:

Object model = new { Name = "Matt" };
var service = new TemplateService();
service.Compile(template, model.GetType(), "tmp");
var result = service.Run("tmp", model)

regards,