I am currently developing a Survey management system for my company. I am getting pretty good at creating straightforward classes that persist to a database. I do have a couple questions on optimum uses of AR.
I have a user security model that has User, Roles and Sessions. When a user logs into the system, a new session should be created and persisted to the database. I have created a support class that actually has a Login method that takes a user name/password hash and validates and creates a session object. Is it more ideal under the AR model to put that logic into the User class itself or keep it in a utility class? Also, The session has an "EndSession" method that first checks to see if the Session object "IsUnsaved" if it is not "Unsaved" then I update the logoutdate time and set the session to inactive then call SaveAndFlush() to update the object and return false or true when this is done. I know there are plenty ways of performing these tasks, what I am curious to learn is if this is a good way of doing this? Also, are there good resources out there that talk about using the AR patter within WinForms programs? What types of Interface patterns work well with AR and where can I go to learn about them? Thank you again for your help! Chris Sims --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
