3 ms·
That's deep and thought-provoking. I like it! One of my clients has a database flag field that I needed to use to determine whether or not to show something on
by DougWebb 9y ago
That's deep and thought-provoking. I like it!
One of my clients has a database flag field that I needed to use to determine whether or not to show something on their website. Should be a simple boolean field, I thought. Nope; their field can contain one of half a dozen character codes, none of which are Y or N. So you're right; I created an enum to represent the allowed codes and map them to meaningful names, and then I had to create a second boolean property to contain the business logic that decides whether or not to do the display based on the various codes.