Recently, I have made a new system in the company, built a model, and found that there are a bunch of enumerations to be written. In order to avoid making the wheel on your own, I searched for the enumeration generator on the Internet. Instead of finding a bunch of entity generators, I had to write them myself.
Write a highly coupledProgram...
1. server name Hard Encoding
2. The first field in the default table is the enumerated value.
3. The default table field "name" is the enumeration name.
4. added the description attribute, which can be bound to the drop-down list through reflection.
If you want to use your own database, open the source code to modify it.
Extension considerations: According to my current program, if "name" is Chinese, the enumerated name is Chinese. In fact, we can create another English Name field in the table, so that the English name can be used as an enumeration name, abstract.
Source code:/files/benjaminyao/generateenum.rar
Dimtimetype. CS is an example of generation in directory debug.