Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where put SQL in DataAccess Class?
Message
De
18/08/2005 18:01:56
Eugenio Casal
Futura Tecnologia Informação Consult Ltd
São Paulo, Brésil
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00871117
Message ID:
01042108
Vues:
21
Hi Kevin,

>1. You can place the SQL statements in the data access class. If you do this, I recommend using a bridge pattern. For example, you could create a method on the business object named "GetOrdersByCustomerID", and create a corresponding method on the data access object named "GetOrdersByCustomerID". The method on the business object passes the call on to the data access object that contains the actual SQL SELECT command. This is the "purer" approach, but requires a little extra work.


Would you please show me the code (c#) of the business object method using this approach?

Thanks in advance,

Eugênio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform