Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Next Design Question
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01433932
Message ID:
01433960
Views:
42
>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......
Previous
Reply
Map
View

Click here to load this message in the networking platform