T
Tarey
Hi,
When you connect to a database and retrieve data, ususally
that data is displayed in a textbox, listbox, grid, etc.
The books I've read usually to this. But shouldn't a class
be created, then have the data populate the class then
display it. For example, instead of having employee
information - name, pay, etc., retrieved by a datareader
and displayed in textboxes, should an Employee class be
created first? Then the information from the database
could populate the Employee class or a collection of
emplolyee classes be displayed.
Does anyone know of books, examples, or other resources
that discuss this?
TIA,
Tarey
When you connect to a database and retrieve data, ususally
that data is displayed in a textbox, listbox, grid, etc.
The books I've read usually to this. But shouldn't a class
be created, then have the data populate the class then
display it. For example, instead of having employee
information - name, pay, etc., retrieved by a datareader
and displayed in textboxes, should an Employee class be
created first? Then the information from the database
could populate the Employee class or a collection of
emplolyee classes be displayed.
Does anyone know of books, examples, or other resources
that discuss this?
TIA,
Tarey