I have a project using Entityframework Code First. And the model contains a few enums which I want to generate from the database using the T4 text template.
But I'm facing a few challenges:
- If the database doesn't exist yet, no enums will be generated;
- If the database does exists, how to run the
T4template? - And how do I get the enums in the database before running the
T4template?
Has anyone done this before and overcome these challenges?