c# - Is it bad practice to use an enum that maps to some seed data in a Database? -
i have table in database called "orderitemtype" has 5 records different orderitemtypes in system. each orderitem contains orderitemtype, , gives me referential integrity. in middletier code, have enum matches values in table can have business logic different types.
my dev manager says hates when people this, , not sure why. there better practice should following?
i time , see nothing wrong this. fact of matter is, there values special application , code needs react differently values. manager rather hard-code int or guid identify type? or rather derive special object orderitem each different type in database? both of suck worse enum.
Comments
Post a Comment