Hi,
I want to create a data access logic component for a win form app...
I saw some example DAL components in web and groups.
And I am surprised to see that all methods of DAL component examples return
a dataset.
For ex., we have a GetEmployeeById method on the DAL comp. And it returns a
dataset containing a table with the employee info (fields) that we requested
by Id.
Is this a valid approach in designing a DAL component.
I mean, my question is what happens when the user navigates from an employee
to a different one. Every time a new employee is accessed, a new dataset is
returned by DAL layer.
Does this create a dataset inflation in the app.?
What happens to old datasets then? Should they be disposed before navigating
to a new employee...
Then another problem is databinding. You can not use visual data binding
facilities of Win forms because You are returned a new dataset each you
request a new employee from the DAL... So, you have to databind in code
every time the user navigate to a new employee record..
Is there anyone with experience on this subjects... Or do you know a good
article about it?
thanks in advance...