I am building a .NET C# "community" application.  I have classes for the
different types of users:  Person, Visitor, Member, Administrator which
inherit from each other, in the order shown above.

Now I am developing properties and methods of the Member class.  Each Member
has data in SQL tables, like PersonAddress, PersonEmail, PersonCategory,
etc., which represent mailing addresses, email addresses, and search
preferences chosen by a member.  When a Member signs in, a Member class is
created and placed in Session.

In the constructor of the Member object, I will call the methods
PersonAddress_SelectAll(), PersonEmail_SelectAll(), etc. and populate
DataTables (private properties of the Member class) with only that user's
data.  This way, when users manage their accounts, their data is immediately
retrieved from memory instead of going to SQL.  If the user needs to
insert/update a row, PersonEmail_Insert() or PersonEmail_Update() would be
called, and the stored procedure will return an updated recordset to
repopulate the in-Session DataTable.

Does all this seem sound so far?

Francesco

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to