I am now building a dynamic list from multiple tables and return this as a DataReader. I will fill the values in the DataReader to my Custom Business object. In my BL I have a Enumuration called TemplateCategory(Template/TemplatePart). I need to return and fill the TemplateCategory property of my business object based the ResultsetFields of the Dynamic Query.
The tricky part here is, I am not having the corresponding value directly stored in the database field. I have to evaluate the TemplateCategory value based on the presence of an Id in any one of the table in the database (tempaltepart/tempalte).
I have Four tables TemplateOrPart, Template,TemplatePart and TemplateOrPartVersion. The table TemplateOrPart has all the IDs generated. If it is a Template then the Id will be stored in TemplateOrPart and Template tables.
If it is a TempaltePart then the Id will be stored in TemplateOrPart and TemplatePart tables. So If a user passes a TempalteId from UI, I have to check in Template and TemplatePart table and set it's category accordingly(TemplateCategory.Template or TemplateCategory.TemplatePart).
Is there any way to evaluate the above TemplateCatgory Enum value within the DynamicList?