TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

Scaffold EF Core models using Handlebars templates.
MIT License
210 stars 53 forks source link

[Question] How to add custom templates #140

Closed russosalv closed 3 years ago

russosalv commented 4 years ago

How I can add custom template? i would to have something like that:

`{{> imports}}

namespace {{namespace}} { {{#if comment}} ///

/// {{comment}} /// {{/if}} {{#if class-annotation}} {{{class-annotation}}} {{/if}} public partial class {{class}} : {{fox-entity-interface}} { {{{> properties}}} }

public partial class {{class}}Navigable : {{class}}
{
    {{{> constructor}}}
    {{{> navproperties}}}
}

}`

i also added CodeTemplates\CSharpEntityType\Partials\Navproperties.hbs but i receive error on build can you help me?

tonysneed commented 4 years ago

The ability to register new partial templates in the Partials folder was requested with #73 and implemented with #124. Unfortunately, this broke creation of the CodeTemplates folder (#132) and had to be reverted. I'll keep this issue open for now, in case someone would like to attempt another implementation.

tonysneed commented 3 years ago

I'll close this issue for now and re-open if there is renewed interest in this feature.