CodeGenHero Metadata
Metadata is information that describes other data (data about data). In CodeGenHero™, the output of the metadata source extraction process are stored in files with a .cghm file extension.
Currently, the metadata used by the CodeGenHero™ templates focus on information about relational database tables, fields, and relationships between entities. This makes CodeGenHero™ especially useful for projects in which a legacy database exists and a new application is required to interact with that legacy database. In future releases, CodeGenHero™ will support Metadata Sources that are not databases, like a code-first workflow.
CodeGenHero™ Metadata Tab and default location of metadata file.
Creating a New Metadata Source
Creating a new metadata source involves connecting to an existing database and setting the class name and namespace for your Entity Framework Core DbContext class. One very cool option is to have CodeGenHero™ also generate and output model classes for your EF DbContext (that is, POCO’s and DbContext itself). This option reverse engineers the database, outputs code first model classes, and avoids the drudgery associated with manually writing all that code!