Recently doing a little webapi docking project, orm chose dapper, we will start a few tables, and also several entities dto, hand line and is also good;
The demand for change, api sharp increase in the number, a corresponding increase in the number of tables, table structure write entity written uncomfortable, but also easy to copy the wrong accidentally, decisively enabled code generation;
Before also worked on a winform entity generator, a general idea is to read the table structure of database connections 2 3 generating entity;
Function relatively small, although practical, but some still single;
Come back at night on the Internet to find a look, VS comes with a text template, lightweight and flexible, it is relatively easy to learn;
New text templates in 1 project
2 Syntax
Reference article https://www.cnblogs.com/c233/articles/8043320.html