I am trying to find a better way to do my project for listing. Say I have a class and an enumeration:
public enum ActionType
{
Acceptable = 1,
Unacceptable = 2,
PendingReview = 3
}
public class Report
{
public ActionType Action { get; set; }
}
Let's say I also have a database table that stores different types of actions:
Id Action
1 Acceptable
2 Unacceptable
3 PendingReview
if I want to add another type of action at a later day, I will need to update the enumeration and update the assemblies. But I like how enumeration reduces errors, simplifies code reading, and provides advanced compatibility. What is an effective way to use new types of actions?
Thank!
source
share