I am new to the C# arena. Although I do have programming experience in Visual Foxpro.
I am trying to setup a basic Windows application where a lot of the user's input will be based on selections from metadata tables.
I am using Visual C# 2008 Express Edition
I am trying to use comboboxes for displaying the majority of this metadata. My two main tables are "persons" and "docs." In my first scenario, my persons table has four int fields for degrees - degree1, degree2, degree3, and degree4. The metadata table that I want to use for these fields in call "degree" and contains three fields - id, name, and description. (example data: id=1 name="M.D.", id=2 name="Ph.D", etc)
What I am trying to accomplish on my form with comboboxes is to display the "degree.name" field from the degree metadata table but store the "degree.id" value in the persons table for each respective degree box, hence the int data type.
In my "docs" table I have several similar fields. For example, I have an int field called "position" and a metadata table called "position" with the same three fields - id, name, and description. (example data: id=1 name="Faculty", id=2 name="VIP Doctor", etc.). I want to do the same thing here, display the position.name field to the user, but store the int choice in the docs.position int field.
Do I do this in code? Or is there a way to do it with these fancy "bindingsources" and "tableadapters" and such?
My reasoning for using "metadata" is to allow the user to make a change to the "name" in any metadata and have that change reflected throughout the application.
Am I asking for trouble? How common is the usage of metadata?
Thanks a million for your assistance.