Closed omatrot closed 5 years ago
My framework supports adding Handlebars helpers. See the project ReadMe for instructions. (Note this does not work with the EF Core Power Tools.)
For customizing the property types, there is also an interface you can implement. (I can provide more info on that if you like.)
For customizing the property types, there is also an interface you can implement. (I can provide more info on that if you like.)
If you think this would make dcerialize integratation easier , I would.
What you need to do is copy and rename TypeScriptHelper.cs. Just update the TypeName
method to return desired TypeScript types as strings.
Then in your ScaffoldingDesignTimeServices
class after calling AddHandlebarsScaffolding
, register your class as follows:
services.AddSingleton<ITypeScriptHelper, MyTypeScriptHelper>();
Thanks for that I'll see what I can do.
I'm trying to customize the provided templates in order to integrate dcerialize. It seems to me that I can't test for a simple equality to customize the generated code:
The template does not compile:
I think I've uderstood that this is because I need to register a helper because the built-in helpers just works for true or false evaluation.
Is there a trick to do that or should we modify the HandleBar.NET Code ?