Possible Duplicate:
How to create a C# class whose attributes are rows in a database table with ADO.NET?
At the moment I have the following class:
public class myActions
{
public const string Create = "Create";
public const string Read = "Read";
public const string Update = "Update";
public const string Delete = "Delete";
}
However, if the table called Action in the DB changes (adds or deletes possible actions), I do not want to modify the application in order to support the new action. So, my question is: how to keep this class updated with the actions stored in the DB and be able to use this actions throughout the application?
Update: The table in the database has only two columns: idAction, Name.
It appears that you are not using the database, but instead creating a class which mirrors the data you have in a database table.
You should start by understanding the notions of using data in your application.
For a quick start, I recommend these videos from Microsoft: Beginner’s Guide to the ADO.NET Entity Framework.
In 30 minutes you will have the basic learnings you need to start building applications with data.