I have an enum declared for a lookup table that won't change (Status).
public enum POStatus
{
Draft = 1,
SubmittedForApproval = 2,
Approved = 3,
Rejected = 4,
Cancelled = 5,
Issued = 6
}
But my entity class of course has defined the property for this FK field as in int. So my BLL is full of code like this:
if ((POStatus)po.StatusID == POStatus.Draft)
I downloaded the task performer. First, it's not even clear t me how to get it to work. I followed the instructions on modifying the config file - but how do I tie it to a project? This task performer seems to apply to all projects??
Second, if it does what I think it's going to do, all it's going to do is save me a few minutes of typing up the enum structure. In order to get rid of these ugly casts all over the place, I need the property on the entity declared using my enum.
I've also searched all the previous threads on this subject.
Is there more to this? Is it even possible to do better here?