I have two tables
EnumType(EnumTypeID,Name,Description)
EnumTypeValue(EnumTypeValueId,Name,Value,EnumTypeID)
EnumTypeValue references EnumType.
General Idea is something like I want to Create Enums for all Values in EnumType table and for each Enum its values will be corresponding values in EnumTypeValue table. Suppose I have row in EnumType(1,Gender,some description) and corresponding to it in EnumTypeValue i have two rows (1) 1,Male,5,1 (2)2,Female,6,1 .I want to create dynamically, public enum Gender {Male = 5,Female=6} so that i could use it in code as enum. There are going to be many such enums as the project will progress. All I want, just run particular code and all the enums will be generated.
I am using EntityFramework for DB interaction.Any help will be highly APPERICIATED.