I try to make a custom class with the scaffold command.
This is my model of custom class Class.hbs
{{> imports}}
{{using-base-class}}
namespace {{namespace}}
{
{{#if comment}}
/// <summary>
{{comment}}
///
</summary>
{{/if}}
{{#each class-annotations}}
{{{class-annotation}}}
{{/each}}
public partial class {{class}} {{base-class}}
{
{{{> constructor}}}
{{{> properties}}}
}
}
My C# code:
public void ConfigureDesignTimeServices(IServiceCollection services)
{
services.AddHandlebarsScaffolding(options =>
{
options.TemplateData = new Dictionary<string, object>
{
{ "using-base-class", "using TEST_NET_7.Interface;" },
{ "base-class", ": IEntityId" }
};
});
}
The command working well with this configuration. It's adding my class to all generated classes, but now I want to ignore some class on scaffold. Like the entity class.
How I can do that ?

This work fine for me.