Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Next Design Question
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01433932
Message ID:
01433960
Vues:
43
>I have created a class called DataAccess. It's in its own project in the solution. It contains a static reference to my SqlDataAccess class. Right now I have a method in it called GetCompanies() that returns a dataset containing one or more companies.
>
>In the GetCompanies method I was considering populating a generic list containing instances of the Company class and returning that to the UI layer, instead of returning a dataset.
>
>Anyone think there's any benefit to this? Pro's Cons?

Hi,
I guess it depends on what you will be doing with this in the UI. My intuition would say have the SQLDataAccess class return a Dataset to the DataAccess layer but have methods there that either simply pass on the Dataset or convert to different representations (e.g the list of Complany classes) as required.

I'm working with the EF so everything I get from the DB is already an object by the time I get my hands on it so......
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform