Enumeration generation tools-original and open-source

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.