Question: I would like to have a list of enum values with extended data. The database will only save an integer value corresponding to my enum value, but in code I would like to have more information than just the enum name.

Let me give you an example:

```
public enum Reason
{
    NotEnoughStock, // Valid = yes, Responsability = company, Text = There is not enough stock
    ProductNotAvailabe, // Valid = no, Responsability = company, Text = Produc is not available
    PaymentNotDone, // Valid = no, Responsability = client, Text = Payment is not done
    BlackListedClient, // Valid = no, Responsability = client, Text = Client is black listed
    NotEnoughTime // Valid = yes, Responsability = company, Text = There is not enough time
}

```

How can I do that? Should I use something else than an enum? I like the enumeration.

Answer: 
You could create an extension method for the enum so that you still can enjoy the enum and getting data in Reason object.

```
var reason = Reason.NotEnoughStock.GetReasonInfo(ReasonData);

```

Sample

```
internal class Program
{
    public static void Main(string[] args)
    {
        var reason = ReasonConstant.Reason.NotEnoughStock.GetReasonInfo(ReasonData);
    }
}

public static class ReasonUtils
{
    public static ReasonInfo GetReasonInfo(this ReasonConstant.Reason reason, Dictionary<ReasonConstant.Reason, ReasonInfo> reasonData)
    {
        if (reasonData == null)
            return null;
        if (!reasonData.ContainsKey(reason))
            return null;
        else
            return reasonData[reason];
    }
}

public class ReasonInfo
{
    public bool IsValid { get; set; }
    public string Responsability { get; set; }
    public string Text { get; set; }
}

public static class ReasonConstant
{
    public enum Reason
    {
        NotEnoughStock, // Valid = yes, Responsability = company, Text = There is not enough stock
        ProductNotAvailabe, // Valid = no, Responsability = company, Text = Produc is not available
        PaymentNotDone, // Valid = no, Responsability = client, Text = Payment is not done
        BlackListedClient, // Valid = no, Responsability = client, Text = Client is black listed
        NotEnoughTime // Valid = yes, Responsability = company, Text = There is not enough time
    }
}

```
Create a class to store other information e.g `ReasonDetail`, then use `Dictionary<Reason, ReasonDetail>` and provide the mapping between the `Reason` and `ReasonDetail`