Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class/Business Object Design Questions
Message
 
À
20/01/2005 08:21:37
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
00978821
Message ID:
00979185
Vues:
12
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform