jlamfers/RazorMachine

TemplateFactory don't create the strongly typed template base.

Closed this issue · 0 comments

I have implemented a custom template MvcTemplate<TModel> : MvcTemplate : TemplateBase and in the config file <templates baseType="MyNamespace.MvcTemplateBase```1, MyAssembly" language="C#" ... /> but the generated code inherits from MvcTemplateBase, but I NEED it to inherit MvcTemplateBase<TModel>.

Am I doing something wrong?

I don't have the have the code here, but as far as I remember, I got this workarounded passing the model type to Factory.CreateTemplateInstance then to CreateBucket and changing the XiptonEngineHost.DefaultBaseClass to MvcTemplate<MyModelType>.