Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Enum Composer
Enum Composer

Enum Composer

Victor Cherniavsky

|
1,369 installs
| (0) | Free
Generate and update C# enumerations using data from a MS SQL Server, ODBC or OLEDB data sources.
Download

Enumeration Composer allows to generate and update enum definitions in C# code using data from SQL Server, ODBC or OledDb sources. An enumeration is attributed with SQL SELECT statement which define enumeration values. Connection to data source is defined either in *.config file or in C# attribute.

[EnumSqlSelect("SELECT ContactTypeID, Name, Name FROM Person.ContactType")]
public enum ContactTypeEnum
{  
[Description("Accounting Manager")] <-- values and descriptions are generated
AccountingManager = 1,                       from SQL      
[Description("Assistant Sales Agent")]   
AssistantSalesAgent = 2,   
//[Description("Assistant Sales Representative")]  <-- comments are preserved          
//AssistantSalesRepresentative = 3,
}

To reduce pollution of the code with unnecessary definitions Enumeration Composer preserves commented options during updates. Look-up tables could be large, and values that are not used in the code at the moment can be commented out untill necessary.

See details: https://github.com/uriah65/EnumComposer17/wiki

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft