Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class/Business Object Design Questions
Message
 
To
20/01/2005 08:21:37
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00978821
Message ID:
00979185
Views:
10
Joe,

>1. How can I configure my classes to use properties (private member variables) and accessors (getters/settors) within MM.NET? Additionally, how would I have to configure my methods to work with this design structure?

One of two ways:

1. Use strongly typed DataSets (the next version of the Dev Guide discusses this in detail)

2. You can add properties to your business object that access the business object's DataRow property behind the scenes.

For example:
public string FirstName
{
   get { return this.DataRow("FirstName");
   set { this.DataRow("FirstName") = value; }
}
>2. What is the best practice class design for a business object wherein the related database table has foreign keys that are used as lookups (code to description in another table)? Do you only include the code field in the object design or do you include the corresponding description from the primary table?

Its perfectly acceptable to do a join that pulls the description in

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform