TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

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

EF Core Power Tools #224

Closed ignaciosalazarcalle closed 1 year ago

ignaciosalazarcalle commented 1 year ago

Hello,

I don't fully understand the functionality of how to make custom templates work.

I have a project with Context from the data model and I am using EF Core Power Tool to generate the entities and context from a database.

I would like that, when the entities are generated, I can perform a validation in my template so that, depending on the name of the table, it inherits the class of an entity of its own.

Is this possible?

I am working with EF Core 6

Regards,

tonysneed commented 1 year ago

It is not possible to insert code into the templates. If you would like this behavior, try the T4 approach supported by EF 7.