Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# DataSet Factory Class
Message
De
20/04/2008 13:57:20
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01311453
Message ID:
01311965
Vues:
19
>Now that I have invested some time learning how to use DataSets, I'v been thiking that if I created a class for each table, I would have dozens of classes.

Well, I don't think you really want a class for every *table*. Most DataSet classes are designed around functionality and typically contain many tables. Take a CustomerDataSet as an example. You might have a "driving" parent table, Customer. Then you might have several child tables, such as Address, OrderHeader, OrderDetail, etc. These DataTables are all part of the CustomerDataSet. They may or may not correspond to actual database tables. Think of a DataSet has a functional entity rather than just a table.

There's nothing wrong with lots of DataSet classes either. We have ours grouped by functionality ... so we have a project containing Personnel DataSets (it contains several different DataSets classes used for different purposes in our Personnel module). Then we have a project containing Incident DataSets (again, it contains more than one DataSet class). etc.etc.etc.

Just more food for thought. =0)

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform