I currently have a SQL Server 2005 table that looks something like this:
ID | name | desc
----------------------
1 | ONE | Value one
3 | THREE | Value Three
5 | FIVE | Value five
This table corresponds to an enumeration in C # that looks like this:
enum MsgTypes{
<summary>Value One</summary>
ONE = 1,
<summary>Value Three</summary>
THREE = 3,
<summary>Value Five</summary>
FIVE = 5
}
So my question is this: is there a way to link the enumeration to the SQL table so that any changes / additions to the values in the table do not need to be manually created in C # code?
source
share