Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

It's maybe simple but I think about this every time I build a new application.

How do you name the class for the current user of the application and for the orm class of the user table?

Usually I have something like

  • CurrentUser: Logged-in user, stored in session, info for last activity etc
  • User: ORM Class (C# EF CodeFirst, but it doesn't matter)

And yes, they could have the same name in different namespaces, but I don't really like that.

share|improve this question

migrated from stackoverflow.com Nov 17 '11 at 16:01

This question came from our site for professional and enthusiast programmers.

closed as not constructive by ChrisF Dec 5 '11 at 11:56

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer 1

What you have seems fine, although if your CurrentUser is really a Logged-in User, I might change the name to reflect that. Perhaps something like AuthenticatedUser or UserSession

share|improve this answer
    
I wouldn't use UserSession, as a Session object ussually contains a User, and is different than a User object. –  CaffGeek Nov 17 '11 at 16:08
    
@Chad I only threw it out there because the question isn't really clear and it sounded like the CurrentUser could contain the logged in user object along with the Last Activity information. Which term you use depends on what the class contains and what it represents –  Rachel Nov 17 '11 at 16:31
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.