R
Ronald S. Cook
Hi,
I have a class "User" in my application's business tier, and an associated
table "User" in my database. A user has a type. Currently they are:
ID Name
1 Regular User
2 Power User
3 Executive User
Etc...
In my current model, I have a table "UserType" for the above and a foreign
key reference in my table "User".
QUESTION: In my app, is it cool to be having code that says like "if
(objUser.UserType == 2)...?
For one thing, I'm not crazy about business logic that refences a tables ID
value (but maybe that's ok?). Also, we're actually using GUIDs so that line
would be uglier as the ID value would be that much longer.
Any thoughts?
Thanks,
Ron
I have a class "User" in my application's business tier, and an associated
table "User" in my database. A user has a type. Currently they are:
ID Name
1 Regular User
2 Power User
3 Executive User
Etc...
In my current model, I have a table "UserType" for the above and a foreign
key reference in my table "User".
QUESTION: In my app, is it cool to be having code that says like "if
(objUser.UserType == 2)...?
For one thing, I'm not crazy about business logic that refences a tables ID
value (but maybe that's ok?). Also, we're actually using GUIDs so that line
would be uglier as the ID value would be that much longer.
Any thoughts?
Thanks,
Ron