Create IWorkflowStatus
interface with only one property in it - WorkflowStatus
.
In t4 add IWorkflowStatus
to the signature of every entity that has property WorkflowStatus
, i.e.
public partial class Order: EntityObject, IWorkflowStatus
Next create ExtentionMethod for IWorkflowStatus to work with enum in the way you'd like to.
public static void SetStatus(this IWorkflowStatus entity, WorkflowStatus status)
public static WorkflowStatus GetStatus(this IWorkflowStatus entity)
That's probably the easiest solution.
Another one is to generate a typed property in each entity with the use of T4, but leave the integer property as well.