I'd like to use the same enum across three tiers of my application (presentation -> bal -> dal). I defined the enum in the data layer and I want to use the same enum in the presentation layer (the presentation layer does not have a reference to the data layer). Using someone else's answer to what I think is a similar question, I've built the following enum in the business layer:
namespace bal
{
public enum TransactionCode
{
Accepted = dal.TransactionCode.Accepted,
AcceptedWithErrors = dal.TransactionCode.AcceptedWithErrors,
InvalidVendorCredentials = dal.TransactionCode.InvalidVendorCredentials,
BrokerOffline = dal.TransactionCode.BrokerOffline
}
}
Is this an appropriate way to construct enums between the tiers?